gzip command do in Linux?The gzip command compresses files to save disk space. It creates a smaller version of the file with a .gz extension.
example.txt.gz using the command line?You use the gunzip example.txt.gz command. It restores the original example.txt file by uncompressing it.
gzip filename?The original file is replaced by the compressed file filename.gz. The original file is removed to save space.
gzip?Use the -k option: gzip -k filename. This keeps the original file and creates a compressed copy.
gunzip and gzip -d?Both commands decompress files. gunzip is a shortcut for gzip -d. They work the same way.
data.txt?gzip data.txt compresses the file. The others decompress or use wrong options.
gzip add to compressed files?gzip adds the .gz extension to compressed files.
archive.gz?gunzip archive.gz decompresses the file to its original form.
gzip?The -k option keeps the original file after compression.
gzip filename without options?The original file is removed and replaced by the compressed filename.gz file.