cli-tarHow can I use gzip to compress a file without using tar?
Gzip is a file format used for file compression and decompression. It can be used to compress a single file without using tar. To do so, the gzip
command can be used. For example, to compress a file named file.txt
the following command can be used:
gzip file.txt
This will create a new file named file.txt.gz
containing the compressed version of the original file. The original file will remain unchanged.
The following command can be used to decompress the compressed file:
gunzip file.txt.gz
This will create a new file named file.txt
containing the decompressed version of the original file.
The parts of the command are as follows:
gzip
: the command to compress a filefile.txt
: the name of the file to be compressedgunzip
: the command to decompress a filefile.txt.gz
: the name of the compressed file
Helpful links
More of Cli Tar
- How do I use the command line to tar and zip files?
- How do I use the Unix tar xvf command to extract files?
- How do I convert a gzip file to a tar file?
- How can I use tar commands to zip a file?
- How do I use gzip, tar, and zip to compress files?
- How do I use the shell to tar and zip files?
- How do I use the command line to tar and distribute files?
- How do I use the command line to tar and zip a file?
- How do I use the Unix tar zip command?
- How do I create a tar.zip file in Unix?
See more codes...