Wednesday, October 25, 2017

untar a particular folder from tar.gz file

Tar usually stores the relative path by default.


If you need to extract a particular folder, look at what is in the tar file:

tar -tvf linux.tar.gz

Note the exact filename/path. In the case of my file, I could extract data folder by:

tar -xvf linux.tar.gz apps/oracle/VIS/data

Note: There is no Leading /