KandZ – Tuts

We like to help…!

Linux CLI 38 ๐Ÿง gzip and bzip2 commands

a - gzip command

gzip is used to compress and decompress files
Files compression helps on saving disk space and ...
... trasfering files faster. use -k to keep the original file
note that gzip cannot compress a folder. You can combine find and gzip
find /directory/to/compress -type f -exec gzip {} \;
or ls -l /directory/to/compress | gzip foo.txt.gz
gzip file.txt โ†’ compresses one file
gzip -d file.txt.gz โ†’ decompresses one file
gzip -v file.txt file1.txt โ†’ compresses multiple files


b - bzip2 command

bzip2 is used to compress and decompress files
like gzip, bzip2 deletes the original file. Use -k to keep it
.bz2 extension shows that it is a compress file with bzip2
bzip2 -k 1.txt โ†’ compresses a file and keep the original
bzip2 -d 1.txt.bz2 โ†’ decompresses a file
bzip2 -d -f 1.txt.bz2 โ†’ decompreses a file and overwrite
bzip2 -k 1.txt 2.txt โ†’ compresses multiple files in multiple files
bzmore 1.txt.bz2 โ†’ show information of the compressed file


Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!

Leave a Reply