Saturday, March 30, 2013

Uncompress a tarball

To uncompress a tarball, execute the following command(s) depending on the extension:
tar zxf file.tar.gz
tar zxf file.tgz
tar jxf file.tar.bz2
tar jxf file.tbz2
The following doc snippets explain the tar options being used:
#Extract: tar -xf <archive-filename>
#-z, -j, -J, --lzma Compress archive with gzip/bzip2/xz/lzma
Lastly, if you were to run "tar zxf file.tar.gz" you would end up with a new directory named "file" in your current directory.

No comments:

Post a Comment