Unix Compression & Decompression Commands

Here’s a table that provides the description, syntax, and example for Unix commands for compression and decompression:

gzip fileCompress a file using gzip formatgzip file.txt
gunzip file.gzDecompress a gzip-compressed filegunzip file.gz
tar -czvf file.tar.gz directoryCompress a directory into a tar archive with gzip formattar -czvf file.tar.gz directory
tar -xzvf file.tar.gzDecompress a tar archive with gzip formattar -xzvf file.tar.gz
bzip2 fileCompress a file using bzip2 formatbzip2 file.txt
bunzip2 file.bz2Decompress a bzip2-compressed filebunzip2 file.bz2
zip file.zip fileCompress one or more files into a zip archivezip file.zip file1 file2 file3
unzip file.zipDecompress a zip archiveunzip file.zip

Leave a Comment

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

Scroll to Top