GZIP Commands Cheat Sheet

Here is a cli commands cheat sheet for GZIP command, you can use this as a quick reminder for basic commands with a brief description for each of the commands.

What is GZIP command?

Add some data here

tags: [ compression ]
# To create a *.gz compressed file
gzip test.txt

# To create a *.gz compressed file to a specific location using -c option (standard out)
gzip -c test.txt > test_custom.txt.gz

# To uncompress a *.gz file
gzip -d test.txt.gz

# Display compression ratio of the compressed file using gzip -l
gzip -l *.gz

# Recursively compress all the files under a specified directory
gzip -r documents_directory

# To create a *.gz compressed file and keep the original
gzip < test.txt > test.txt.gz

Check out the GZIP command documentation .

You can also check our MegaSh cheatsheet tool, that has 150+ searchable linux cheat sheets in one page, so you never forget a command as you work again

Check Also

Best AI tools list