Wednesday, November 30, 2011

Extracting and tar.bz2 on Linux

To extract a tar.bz2 file, use this command:
tar -jxvf filename.tar.bz2
where j means  it's for bzip2, xz, lzip and lzma compress extension.

To extract a tar.gz file, the command is:
tar -zxvf filename.tar.gz
where z means it's for gzip, gunzip and ungzip compression extension
x is extract files from filename.tar.gz
v is to list all the file proccessed
f is to extract filename.tar.gz

if you want to specify the directory to where the extracted file go, use this command:
tar -xvzf file.tar.gz -C directory
where C means  put extracted file to directory

No comments:

Post a Comment