Password-Protect a Zip File with zip -e
Encrypt an archive from Terminal before emailing or uploading it.
01Command
$ zip -e -o 资料.zip 合同扫描件.pdf02What it does
The built-in zip supports symmetric encryption via `-e`; each member file is encrypted and zip asks for the password twice. Add `-o` to obscure (scramble) file names in the listing, since standard zip encryption leaves filenames readable to anyone inspecting the archive structure. Recipients can open it with any unzip tool, including Finder’s built-in extractor.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- zip – Package and compress filesEvidence: Documents -e encrypt with a password prompt and -o obscure filenames
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
List the biggest files in your home folder that are eating disk space.
Make Finder display .pdf, .docx, .png and every other extension at all times.
Encrypt a folder or files into a password-protected archive from Terminal.