~/leohuynh.dev/gists/macos-zip-cli

Zipping files on macOS

·–– views#macos#bash#zip

MacOS has a built-in command to zip files and directories into a single file.

zip -r my-archive.zip <list of files or directories, separated by spaces>

For example, to zip a directory called my-directory and a file called my-file.txt, you can use the following command:

zip -r my-archive.zip my-directory my-file.txt

Happy zipping! clinking beer mugs

react to this snippet