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][tlug] Answered: Re: Solaris tar: how to pre-pend a parent directory?
- Date: Wed, 23 Feb 2011 17:56:21 +0900
- From: Jean-Christian Imbeault <jc.imbeault@example.com>
- Subject: [tlug] Answered: Re: Solaris tar: how to pre-pend a parent directory?
Raymond, thanks for the reply. The trick was the -h option as you suggested. With that I can go up one directory, create a link to what I want to tar and be on my merry way. Thanks! Jc On Wed, Feb 23, 2011 at 5:39 PM, Raymond Wan <rwan.kyoto@example.com> wrote: > > 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 > > > -- > To unsubscribe from this mailing list, > please see the instructions at http://lists.tlug.jp/list.html > > The TLUG mailing list is hosted by the award-winning Internet provider > ASAHI Net. > Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ >
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: Re: [tlug] Solaris tar: how to pre-pend a parent directory?
- Next by thread: [tlug] -tomorrow- [announcement] nomikai February 25 (Friday)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links