Bruno Hertz wrote:
Michael Marsh <michael.a.marsh@gmail.com> writes:On Tue, 29 Mar 2005 07:20:52 -0500, Matt Price <matt.price@utoronto.ca> wrote:ok, I give up -- how do I tell tar to extract a tarball to a location other than ./ ? I 've been through the info pages but didn't notie the solution in any of the obvious places.I usually cd to the destination directory and worry about the path to the tarfile: $ cd src $ tar xvf ../downloads/tarfile.tgzAnother variation: cat tarfile.tgz | (cd destdir; tar zxvf -)
The above method will not function as intended, if the destdir is not present. So I would go with
cat tarfile.tgz | (cd destdir && tar xzvf -) raju