Living in the Shell #7; zip
Babak K. Shandiz
Posted on December 1, 2021
zip
đī¸
Creates ZIP archives.
Test archive integrity -T
zip -T x.zip
Create/update zip archive (add/update file)
zip x.zip ~/.bashrc ~/.profile
Creates
x.zip
archive file (if not exist) and adds.bashrc
and.profile
to it.
Add directory and its content -r
zip -r x.zip ~/Documents
Without
-r
nothing is added.
Add all names except directories -D
zip -D x.zip ~/*
Set password while add/update files -P
zip -P my-password x.zip file-to-add-or-update.txt
Store-only mode (fast, without compression) -0
zip -0 x.zip ~/Pictures
Fast compression mode (fast, low compression) -1
zip -1 x.zip ~/Pictures
Ultimate compression mode (slow, maximum compression) -9
zip -9 x.zip ~/Pictures
Delete file from archive -d
zip -d x.zip .bashrc
đ đĒ đ
đŠ
Babak K. Shandiz
Posted on December 1, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.