|
|
how to extract archive in linux - Linux
|
Views : 321
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Extracting archives is also very simple. Instead of the c switch the x is used and the archive name is given as the only other parameter. The commands for archive extraction shown below correspond to the archive creation commands given earlier.
tar xf dir.tar # ©2007 linux.dsplabs.com.au
tar xzf dir.tar.gz # ©2007 linux.dsplabs.com.au
tar xjf dir.tar.bz2 # ©2007 linux.dsplabs.com.au
Infact, in most cases, tar will figure out what archive type you are trying to extract (from their hex headers I suppose), so that the filter specifications are not really needed. Hence, the following still works fine.
tar xf dir.tar # ©2007 linux.dsplabs.com.au
tar xf dir.tar.gz # ©2007 linux.dsplabs.com.au
tar xf dir.tar.bz2 # ©2007 linux.dsplabs.com.au
However, if you explicitly specify the decoder, then tar will assume that that is the encoding of the given archive. If for whatever reason that is not the case, an error will occur.
|
|
By gowtham, On - 2010-02-03 |
|
|
|