Compress a Folder in Linux using Command line

To create a .gz archive of a directory and its sub-directories
tar -cvzf filename.tar.gz directory_to_compress/

To extract the compressed file, replace -cvzf with -xvzf

To create a .zip acrhive
zip -r filename.zip folder_to_zip

Popularity: 18% [?]

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *