Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

zip

Package and compress files (zip format)

Syntax

zip [OPTION]... ARCHIVE FILE...

Common Options

-rRecursive compression
-eEncrypt archive
-PSpecify password
-9Best compression
-0No compression (store only)
-xExclude files
-uUpdate archive
-dDelete from archive
-lConvert LF to CRLF
-vVerbose output

Common Examples

zip archive.zip file1.txt file2.txt

Compress multiple files

zip -r archive.zip directory/

Recursive compress directory

zip -e secret.zip file.txt

Encrypt and compress

zip -r backup.zip . -x "*.git*"

Exclude specific files

zip -u archive.zip newfile.txt

Update archive

zip -d archive.zip unwanted.txt

Delete from archive

zip -0 store.zip file.txt

Store without compression

zip -P password archive.zip file.txt

Compress with password

Related Commands

Related Tools

More Code & Dev Tools