In this way the directory is stored in file.tar. Keep in mind that when you specify a directory, the tar file the directory and all subdirectories. Now look at compression. The traditional control compression of Linux is compress which compresses a file, usually a tar archive (though not necessarily). So if I write
compress file.tar
I find myself in a directory file.tar.Z which is the compressed version of file.tar. To decompress using the uncompress command, which performs the opposite operation. However, it is widely used in practice it works the same way that gzip compresses but almost double. Gzip, however, is only a compressor, and has nothing to do with who is a pkzip archive (apart from the fact that the algorithm used is one of those of pkzip). Running gzip file.tar file.tar.gz you get a compressed file and decompress with gunzip command. These two commands are used on Linux instead of compress and uncompress, and are common on almost all Linux systems, by virtue of the fact that they are free and better (more compact and faster). Among other things, you can directly use it along with the GNU gzip tar (System on Linux) using the switch z.
Ultimately, on Linux, you can sort, compress and decompress in one fell swoop the file.tar.gz (Linux equivalent of getting a Zip: archiver and compressor) with:
tar tzf file.tar.gz
tar xzf file.tar.gz
tar czf file.tar.gz directory
This article is a summary of basic information you need to have when working with Linux. The aim was to present the essentials to get started with Linux (and Ubuntu). However, to fully exploit the power of Linux is necessary to occasionally look at the manual to discover that there are several commands, each command has many switches that can be helpful.
Bookmarks