Instructions for using the Terminal to create password protected zip files in Mac.
Use the -s switch on the zip command in terminal. So if your folder was called FolderName. Zip -r -s 64 archive.zip FolderName/. 64 is the size of the split (in this case 64Mb). Use -s to set the split size and create a split archive. The size is given as a number followed optionally by one of k (kB), m (MB), g (GB), or t (TB) (the default is m). Instead of using ls and grep and zip's -@, you can use shell globs to select files directly on the zip command line e.g. Zip files.zip file. or zip images.zip.jpg. Also, when using a list of filenames from a file, you can use redirection instead of invoking a separate cat process, zip files.zip -@ zip.lst – steeldriver May 25 '16 at 0:28.
- Create a Folder on the Desktop.
- Place the Files you wish to Zip within the folder.
- Select the Search Icon in the upper right corner.
- Search for the Terminal.
- Select Terminal.
- Enter zip -er NAMEOFZIPFILE.zip
- Enter a space.
- Drag and Drop the Folder on the desktop into the terminal.
- Select Enter/Return.
- Enter a Password.
NOTE: It will not visually display anything to know you are typing when entering a password. - Reenter the Password.
- Select Enter/Return.
- To get to the new ZIP file, select Finder then All My Files.
Open Zip File Terminal
Did you find this article useful?