Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Solaris tar: how to pre-pend a parent directory?



I'm trying to accomplish the following using tar under SunOS but have
a feeling it is not possible. I'm hoping someone on the list can offer
some suggestions.

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

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.

Jc


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links