Results 1 to 2 of 2

Thread: File Compression and Archiving in Linux

  1. #1
    Join Date
    Jul 2010

    File Compression and Archiving in Linux

    Under DOS you use the ZIP, which is both an archive and a compressor. Under Linux we have two separate programs that perform the function separately archiver and compressor. The most widely used today is the archiver tar, the name is a play on words: it is an acronym for tape archiver (that is, its original function was to store files and directories to tape). The tar archive files and directories in a single file, but it compresses them. Now let's see the syntax to save a few hours in the manual. To list the contents of a file.tar:
    tar tf file.tar
    Where t stands for (a produce) table of contents and f specifies that the input of the tar is file.tar (default it is usually the standard input or a device, but not a file). With v (verbose) will show more detail; tvf should always write with the t (command) first, the v (switch) in the middle and the f last. Similarly, to unpack a file.tar necessary to use:
    tar xf file.tar
    where x stands for extract, f is as before and if you want details on what is done, you can also add a V in the middle. Finally, we examine the creation of archives:
    tar cf file.tar directory

  2. #2
    Join Date
    Jul 2010

    Re: File Compression and Archiving in Linux

    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.

Similar Threads

  1. Which is the most powerful file compression tool
    By coolio in forum Windows Software
    Replies: 10
    Last Post: 18-07-2012, 06:57 PM
  2. File compression software for mac
    By Juaquine in forum Windows Software
    Replies: 5
    Last Post: 15-03-2010, 05:07 PM
  3. Powerpoint file compression
    By devrish in forum Windows Software
    Replies: 3
    Last Post: 23-09-2009, 12:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts