![]() ![]() To do so: tar -cvzf ~/Documents ~/Downloads file1.txt file2.txt Creating TAR and TAR.GZ Using 7-ZipĪn alternative way of creating TAR and TAR.GZ archives is by using 7-Zip. You can also compress multiple directories and files by creating a single tarball. To archive and compress the /Documents directory using tar: tar -cvzf ~/Documents Note that you need to pass the file extension (TAR or TAR.GZ) in the archive name as follows: tar -cvzf big-file.txt ![]() The c, v, z, and f flags used in the aforementioned command stand for Create, Verbose, gzip, and Filename. where archive is the name of the compressed file and filename/ directory is the file or directory you want to compress using tar. The basic syntax to create compressed tarballs using the tar command is: tar -cvzf archive filename This ensures that your backup remains unaffected and the files don't corrupt if anything breaks on your system. When you compress a TAR file using bzip2, the output file will have either of the following extensions: TAR.BZ2, TAR.BZ, or simply TBZ.Ĭreating archives is an important step when you're backing up your Linux file system. Bzip2: Similar to gzip, several other file compression algorithms are also available, including bzip2.The TGZ file extension is also used sometimes instead of TAR.GZ. TAR is the file extension for tarballs, whereas GZ denotes gzip. TAR.GZ: A TAR.GZ file is a version of a tarball compressed with the gzip algorithm.The file extension for gzip is GZ and therefore, you can deduce that any file ending with GZ has been compressed using the gzip algorithm. Gzip: GNU gzip is a file compression algorithm used to compress files.This is because the TAR filetype was originally created to store data in magnetic tapes. A tarball is often simply called a TAR file, which stands for Tape Archive. The term tarball comes from the coal-based sealant used during construction works. Tarball: A tarball is a collection of multiple files in Linux stored as a single file.In this article, you will learn how to extract and compress TAR and TAR.GZ files, along with some common terms associated with compression and archives in Linux. While experienced users know what is a TAR file and how to extract it, Linux newbies might face some difficulties in figuring out what to do with it. If you're familiar with packages in Linux, you may have come across a TAR or a TAR.GZ file. File compression is a great way to save storage on a computer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |