Can I extract a specific folder using tar to another folder?
Posted
by
PeanutsMonkey
on Server Fault
See other posts from Server Fault
or by PeanutsMonkey
Published on 2011-07-12T22:34:54Z
Indexed on
2012/09/07
3:39 UTC
Read the original article
Hit count: 511
I am new to the world of Linux and seem to have run into a stumbling block. I know I can extract a specifc archive using the command tar xvfz archivename.tar.gz sampledir/
however how can I extract sampledir/
to testdir/
rather than the path that the archive is in e.g.currently the archive is in the path /tmp/archivename.tar.gz
and I would like to extract sampledir
to testdir
which is in the path /tmp/testdir
.
© Server Fault or respective owner