Linix: Zipping the contents of a directory recursively
Zipping the contents of a directory recursively
zip -9 -r <zip file> <folder name>
Example:
Recursivly zip the contents of the ~/home/documents directory into a zip file named documents.zip
zip -9 -r documents.zip ~/home/documents
Zipping a single file
zip -9 <zip file> <filename>
Example:
Zip a file called my-backup.sql into a zip file named my-backup.zip
zip -9 my-backup.zip my-backup.sql
Unzip
apt-get install unzip
unzip documents.zip
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#