[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f1smrev6a611z5":3},{"type":4,"solution":5},"solution",{"slug":6,"platform":7,"title":8,"description":9,"risk":10,"categorySlug":11,"tags":12,"verifiedAt":21,"updatedAt":21,"categoryName":22,"command":23,"undoCommand":24,"directAnswer":25,"explanation":26,"warning":27,"seoTitle":28,"seoDescription":29,"requirements":24,"macosSupport":30,"sources":31,"related":38},"compress-folder-zip","macos","Zip a folder on Mac from Terminal","Create a clean zip archive of any folder, preserving macOS metadata.","low","files",[13,16,19],{"slug":14,"name":15},"zip","Zip & Archives",{"slug":17,"name":18},"terminal","Terminal",{"slug":11,"name":20},"Files","2025-11-08T00:00:00.000Z","Files & Folders","ditto -c -k --sequesterRsrc --keepParent ~\u002FDocuments\u002FMyFolder ~\u002FDesktop\u002FMyFolder.zip",null,"Replace the two paths in the command below with your folder and the target zip, then run it. A standard zip is created on your Desktop.","ditto is the macOS-native way to create zip archives that preserve resource forks and metadata, so files open correctly when sent to other Macs (and unzip fine on Windows too). --keepParent includes the folder itself in the archive instead of just its contents.","The command overwrites the target zip without asking if it already exists.","Zip a Folder on Mac — ditto Terminal Command","Create a zip archive of a folder on macOS with the built-in ditto command, preserving metadata. Safer than drag-zipping for batch use.","macOS 10.11 El Capitan – 15 Sequoia",[32],{"url":33,"title":34,"publisher":35,"sourceType":36,"evidence":37,"retrievedAt":21},"https:\u002F\u002Fss64.com\u002Fmac\u002Fditto.html","ditto — copy directory contents and create archives","SS64","technical","ditto -c -k creates a PKZip archive; --sequesterRsrc preserves Mac resource forks.",[39,55,69],{"slug":40,"platform":7,"title":41,"description":42,"risk":43,"categorySlug":11,"tags":44,"verifiedAt":54,"updatedAt":54},"show-hidden-files","Show hidden files on Mac","Make Finder display hidden (dot) files and folders.","medium",[45,48,50,53],{"slug":46,"name":47},"finder","Finder",{"slug":49,"name":49},"defaults",{"slug":51,"name":52},"hidden-files","Hidden files",{"slug":11,"name":20},"2025-11-20T00:00:00.000Z",{"slug":56,"platform":7,"title":57,"description":58,"risk":43,"categorySlug":59,"tags":60,"verifiedAt":68,"updatedAt":68},"flush-dns-cache","Flush the DNS cache on Mac","Clear cached DNS lookups when a site resolves to a stale IP address.","network",[61,64,67],{"slug":62,"name":63},"dns","DNS",{"slug":65,"name":66},"diagnostics","Diagnostics",{"slug":17,"name":18},"2025-11-18T00:00:00.000Z",{"slug":70,"platform":7,"title":71,"description":72,"risk":10,"categorySlug":73,"tags":74,"verifiedAt":79,"updatedAt":79},"install-xcode-command-line-tools","Install Xcode Command Line Tools on Mac","Get git, clang and other dev tools without installing full Xcode.","developer",[75,78],{"slug":76,"name":77},"xcode","Xcode",{"slug":17,"name":18},"2025-11-14T00:00:00.000Z"]