Pages

Friday, November 19, 2010

How to extract files in various formats?

Extracting contents in bunzip file (.bz2)


Format : .bz2

Step 1.Convert .bz2 to .tar

bunzip2 inputfile.bz2

This will create a  file called inputfile.tar in the same directory

Step 2.Extract contents in .tar file

tar -xvwf inputfile.tar

This will extract the contents in the .tar file.

Format : .tar.gz

tar -zxvf inputfile.tar

where ,
z is to handle files that were compressed using gzip.
x is to extract.
v is to be verbose about what is going on.
f is to force overwriting if it was already extracted.


Format : .zip
unzip inputfilename.zip

No comments:

Post a Comment