
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Solaris tar: how to pre-pend a parent directory?
Hi Jean,
On 23/02/11 17:17, Jean-Christian Imbeault wrote:
I'd like to create a tar file in such a way that when untarred the
contents are all in a parent directory. This can be done at the
extraction step but I'm wondering if there is a way to do it at the
tar file creation step?
Current state:
$ ls
a b
$ tar -cf tarball.tar a b {insert UNIX magic here}
$ tar -xf tarball.tar
$ ls
a b parent
$ ls parent
a b
How about if you tar from one directory above? Would that work?
I couldn't find any tar options under SunOS to prepend parent
directory and I've also tried a few things with symbolic links but tar
just copied the links and not the files they point to.
Under Debian Linux (sorry, I don't have a SunOS system to
access), the -h or --dereference option will copy the files
instead of the links. Perhaps your tar version will have
something similar?
And no, I also have not heard of an option to prepend a
directory...
Ray
Home |
Main Index |
Thread Index