Mailing List Archive
tlug.jp Mailing List tlug archive tlug 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?
- Date: Wed, 23 Feb 2011 17:39:58 +0900
- From: Raymond Wan <rwan.kyoto@example.com>
- Subject: Re: [tlug] Solaris tar: how to pre-pend a parent directory?
- References: <AANLkTik6a=17YGbYX+Daqrt-Vnx+ptWJSfFEDTpKMrEZ@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11
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 bHow 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
- References:
- [tlug] Solaris tar: how to pre-pend a parent directory?
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Do you whitelist or blacklist utf-8?
- Next by Date: Re: [tlug] Do you whitelist or blacklist utf-8?
- Previous by thread: [tlug] Solaris tar: how to pre-pend a parent directory?
- Next by thread: [tlug] Answered: Re: Solaris tar: how to pre-pend a parent directory?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links