FileCompression

Revision 10 as of 2005-07-21 12:39:19

Clear message

Ubuntu has handle a number of formats directly out of the box. Some others need some packages to be installed.

Supported

Archive formats

To open these formats, simply right click on them and choose "Extract here" to extract them. Double-clicking on them will open the Archive Manager for other tasks.

  • Tar (.tar)
  • Gzipped Tar (.tar.gz)
  • Bzip2 Tar (.bz2)
  • Zip (.zip)

Non-archive formats

The following can be opened by default by Archive Manager, but are not traditionally considered archive formats

  • Deb installer packages (.deb)
    • These are actually programs that need to be installed. Open a terminal and type sudo dpkg -i DEBNAME.deb. Warning: Installing programs from .debs can seriously damage your system

  • CD Images (.iso)
  • Java Archives (.jar)
    • These are java programs. See ["Java"]
  • Firefox extensions (.xpi)
    • These are actually extensions for Mozilla Firefox. To install them, launch Firefox and choose Open File from the File menu. Choose the .xpi file and click ok. Firefox will then install the extension. Warning: Installing certain extensions may damage your Firefox profile

Need additional programs

Rar

Rar (.rar) is a non-free archive format created by Rarsoft. There are several versions of rar and the newest version, 3.0, is not supported by any free tools. To add support for it, install unrar-nonfree (unrar in Breezy Badger) from the multiverse repository (AddingRepositoriesHowto). Non-password protected Rars can then be opened by right clicking on them and choosing "Extract here" or double-clicking them to open in Archive Manager.

Password protected .rar files

To open a password protected Rar file, open the terminal and type unrar -e RARFILENAME.rar. It will then prompt you for the password.

7zip

7zip (.7z) is a new type of archive format. Install the package p7zip from the Universe repository (AddingRepositoriesHowto). You then need to tell Ubuntu how to deal with these files. Right-click on them and choose Properties. The 4th tab is Open With. Click on it and choose the Add button. Select the program Archive Manager. Then you can double click on the archive and extract it from within Archive manager

Ace

The [http://www.winace.com/cgi-bin/getfile.exe?program=LinUnAce&width=628 unace] utility is used for extracting, testing and viewing the contents of archives created with the ACE archiver. To add support for it, install unace from the universe repository (AddingRepositoriesHowto). To extract .ace files, you need to use the commandline: unace x file.ace

Using the command line

If you need to use the commandline to create or extract tar.gz files, here is how to do it.

Uncompressing a GNU Tar archive

GNU Tar

Example: file.tar.gz

tar -zxvf file.tar.gz

There, you're done, you'll have a folder with the contents of the compressed file.

BZ2

Example: file.tar.bz2

tar -jxvf file.tar.bz2

Creating GNU Tar archive

tar -cvf file.tar dir1 dir2 ...

file.tar is the name of the tar file we wish to create and dir1 dir2 are the names of the directories and/or files we wish to include in the tar archive. We can then compress the archive using gzip or bzip2.

Using gzip type

gzip file.tar

This will create file.tar.gz

Using bzip type

bzip2 file.tar

This will create file.tar.bz2

CategoryDocumentation