Thursday, 27 December 2012

File compression in Linux & ubuntu


File compression in ubuntu

For most everyday users, file compression is the process of taking many files and combining them into a single archive file that’s shrunk so it takes up less disk space. This makes the files easier to transfer from
computer to computer. Most Windows users make heavy use the Zip file format, and this is
fully supported in Ubuntu.Double-clicking a compressed file of virtually any format will open it in
the File Roller program, which is a little like WinZip under Windows. To extract any file or folder within the archive, simply click and drag it to a new location.
To create a compressed file from a file or folder, just right-click it and select the Create Archive option. Select the compression type you’d like to use from the dropdown list alongside the filename. Although Zip is popular on Windows, and there is no reason why it can’t be used under Ubuntu, most Ubuntu and Linux users prefer a different type of compression: compressed tar files. Tar has its roots in magnetic tape backup, hence the name: Tape ARchive. A tar file is simply lots of files combined into a single large file. Tar files
aren’t compressed by default, which is to say, tar is not a compression


Archive file extension                         Details
.tar                                                    Tape ARchive; simple format in which files are combined into a larger
                                                         file. Handled by the tar command at the command-line. Tar files aren’t
                                                         automatically compressed. The chief benefit of tar files is that they
                                                         record permission and ownership details, making them ideal for
                                                         backup.
.tar.gz                                               Tar archives that have been additionally compressed using the gzip
                                                        software, usually at the point of creation. Sometimes the .tgz file
                                                        extension is used instead of .tar.gz.
.tar.bz2                                            Tar archives that have been additionally compressed using the bzip2
                                                        software, usually at the point of creation. Bzip2 compression leads to
                                                        the smallest files of all, so is preferable. Sometimes the .tbz file
                                                        extension is used instead of .tar.bz2.
.zip                                                  As with Windows, zip files are compressed archives. Zip files haven’t
                                                       gained much traction in the Linux/Unix world because of legal concerns
                                                       some years ago. This is no longer an issue, but other archive formats
                                                       such as gzip and bzip2 are simply more established.


technology. However, tar files are nearly always compressed using add-in programs, the most popular of which are bzip2 and gzip. Tar files that are compressed usually have double file extensions showing
the type of compression used: .tar.bz2 or .tar.gz.


2 comments:

  1. very nice effort. i had some doubts about file compression in linux, this article helps me a lot

    ReplyDelete
  2. §xz§ is worlds superior to §gz§ and §bz2§, but it requires §tar§ to compress folders and multiple files.

    Whereas §7z§ from the p7zip is superior to all of this, but its flags are a pain, and I've done the work: https://github.com/rautamiekka/public_scripts/blob/master/global_shell_aliases

    ReplyDelete