zip 🗜️

Creates ZIP archives.

Test archive integrity -T

zip -T

Create/update zip archive (add/update file)

zip ~/.bashrc ~/.profile

Creates archive file (if not exist) and adds .bashrc and .profile to it.

Add directory and its content -r

zip -r ~/Documents

Without -r nothing is added.

Add all names except directories -D

zip -D ~/*

Set password while add/update files -P

zip -P my-password file-to-add-or-update.txt

Store-only mode (fast, without compression) -0

zip -0 ~/Pictures

Fast compression mode (fast, low compression) -1

zip -1 ~/Pictures

Ultimate compression mode (slow, maximum compression) -9

zip -9 ~/Pictures

Delete file from archive -d

zip -d .bashrc

About Living in the Shell
Obsessed with doing things in the shell, I’ve decided to share my daily struggles on living in the shell as terse but informative posts.