tar command and relative paths
Posted on 2003-03-06
Ok I have a tar-ing problem was wondering if someone could help...
If I have a tar that contains a bunch of files like:
is there a way to extract all the files/dirs in the imageFolder without having tar make the complete dir home/dummy/imageFolder
(when i run "tar -xvf mytar.tar" it makes the complete dir path from where ever I ran it...)
OR if this isn't possible, is there a way to tar a folder using a complete path /home/blah/blah/myFolder but so that the path in the tar is just myFolder/ , that way the extraction wont make that complete path when I call it...
Thanks for your time.
PS. (please dont tell me I should cd to the dir, I know this, but Im doing some remote programming, and the cd command is not a valid option, everything is being done using absolute paths from /)