This is an old revision of the document!


Extract tgz, tar.gz, tbz, tar.bz2, and tar.xz files

To extract a tgz, tar.gz, tbz, tar.bz2, or tar.xz file, open the terminal and type

cd directory
tar -xvf filename

If the file is owned by root, you may need to use sudo.

Other File Types

.zip

unzip filename.zip

.gz

gunzip filename.gz

.bz2

bunzip2 filename.bz2

.rar

unrar x filename.rar

.Z

uncompress filename.Z

.xz

unlzma filename.xz

.7z

7z x filename.7z

Equivalent File Types

  .tgz is equivalent to .tar.gz
  .tbz and .tb2 are equivalent to .tar.bz2
  .taz is equivalent to .tar.Z
  .tlz is equivalent to .tar.lz
  .txz is equivalent to .tar.xz
Print/export
QR Code
QR Code wiki:tar (generated for current page)