Wednesday, 15 April 2015

How to Extract (untar) an archive

Extract a *.tar file using option xvf

Extract a tar file using option x as shown below:
tar xvf archive_name.tar
  • x – extract files from archive

Extract a gzipped tar archive ( *.tar.gz ) using option xvzf

Use the option z for uncompressing a gzip tar archive.
tar xvfz archive_name.tar.gz

Extracting a bzipped tar archive ( *.tar.bz2 ) using option xvjf

Use the option j for uncompressing a bzip2 tar archive.
tar xvfj archive_name.tar.bz2
 
Note: In all the above commands v is optional, which lists the file being processed.

No comments:

Post a Comment