![terminal mac os create file terminal mac os create file](https://i.stack.imgur.com/6yKcq.png)
You can enter multiple filenames or folder names after the ' zip -er' command, but an errant keystroke or mistyped filename will render the process useless.Īn app that can handle compression and encryption is a better bet for most users – especially when it can handle drag-and-drop or has a window that shows your entire filesystem. Terminal is a great option for zipping and encrypting one file or folder, but it's not great for multiple compressions. Double-clicking the file or folder to open it will prompt you for the password you typed into Terminal, so be sure to keep your passwords in a safe location. That's all it takes! You'll now see a compressed file on your desktop. Note: in the image below, our folder is named 'Setapp' so the command reads: zip -er setapp.zip
![terminal mac os create file terminal mac os create file](https://help.apple.com/assets/6152754A4192845C4361C49A/6152754B4192845C4361C4A1/en_US/7f288e73064fb1012bfa617b6b707e2c.png)
![terminal mac os create file terminal mac os create file](https://cdn-media-1.freecodecamp.org/images/1*REqZX2_JqQjbH9Ly3QsgLg.png)
There's a simple way to zip and password protect folders and files via Terminal.
#Terminal mac os create file how to
How to password protect a ZIP file with Terminal We'll show you how to password protect a ZIP file, open encrypted ZIP files and folders, and discuss some proven methods for safeguarding your data.