Linux

zip

SafeCreate ZIP archives

zip -r <archive.zip> <dir>

Creates Windows-friendly ZIPs. -r recurses into dirs; -e adds a password. The go-to for file handoffs.

Examples

  • zip -r logs.zip /var/log/nginxZip a directory

Syntax

zip [-r] [-e] <archive> <files>

Before you run it

Creation only.

Related commands

  • unzipExtract ZIP archives
  • tarArchive (tar)
  • gzipCompress with gzip

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store