Thursday, 22 June 2017

Extracting tar.gz and tar.b2z in linux








First you have to go to the directory in which your file is stored.
This can be done by using "cd" command
Example: $$ cd Downloads

You can extract .tar.gz files using:

$$ tar xzf file.tar.gz

Similarly you can extract .tar.bz2 files with

$$ tar xjf file.tar.bz2

If you would like to see the files being extracted during unpacking, add v:

$$ tar xzvf file.tar.gz



Note: Here "file" denotes your file name which can be different,