Joseph wrote:
On Sun, 2005-01-09 at 14:53 -0800, Peter Gordon wrote:I dont think it's possible unless you are in a very special case. If you have a number of dirs which have one and only one child.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Joseph wrote: | Is there a way to untar content of a file to a different folder? | Try using the '-C <directory>' option: $ tar -xzf /path/to/archive.tar.gz -C /where/to/unpack
Hope that helps!
This is like redirecting the content of the archive to specific folder. What I wanted to do is to suppress/overwrite the extracted directory name to my own name.
Example if I do: $ tar -xzf archive.tar.gz -C my_folder I get: /my_folder/archive
What I wanted to change is the name of the original folder to different one; example from: archive to archive-temp to the content would not generate "archive" but "archive-temp" archive-temp/
Though I'm not sure it this can be done.
the list of your dir should be something like:
aa
aa/bb
aa/bb/cc
aa/bb/cc/file1
aa/bb/cc/file2
aa/bb/ccc
aa/bb/ccc/file3
aa/bb/ccc/file4
mkdir aaa/bbb
tar -xvf your_arc.tar.gz --strip-components=2 -C aaa/bbb/
good luck ;)
-- [email protected] mailing list
