Extracting Archive File In Linux

Posted: March 4, 2009 in Open Source, Open Source Tutorial
Tags: , , , ,

To extract a tar.bz2 file, use the command :

tar -jxvf filename.tar.bz2


To extract a tar.gz file, the the command :

tar -zxvf filename.tar.gz


The simplest way to extract to a specific directory:
For a .tar.gz file :

tar -xvzf file.tar.gz -C directory


For a .tar.bz2 file :

tar -xvjf file.tar.bz2 -C directory

Comments
  1. Comhghan says:

    hmmmmm… informative.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s