How Do I Compress a Single File in Linux?
Contents You Just Type “Gzip” Followed by the Name of the File You Want to Compress. Unlike the Commands Described Above, Gzip Will Encrypt the Files “In...
Contents
You just type “gzip” followed by the name of the file you want to compress. Unlike the commands described above, gzip will encrypt the files “in place”. In other words, the original file will be replaced by the encrypted file.
How do I compress a file in Linux?
Compress an Entire Directory or a Single File
- -c: Create an archive.
- -z: Compress the archive with gzip.
- -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
- -f: Allows you to specify the filename of the archive.
10 апр. 2016 г.
Must Read
How do I zip a specific file in Linux?
In order to zip multiple files using the zip command, you can simply append all your filenames. Alternatively, you can use a wildcard if you are able to group your files by extension.