Mailinglist Archive: opensuse (2831 mails)

< Previous Next >
RE: [SLE] Duplicating a directory structure
  • From: "Marlier, Ian" <ian.marlier@xxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 27 Jul 2006 14:51:05 -0400
  • Message-id: <D2575519D6CA2840B6D3E26087EA71B6C946@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>


> -----Original Message-----
> From: Jerry Feldman [mailto:gaf@xxxxxxx]
> Sent: Thursday, July 27, 2006 2:48 PM
> To: suse-linux-e@xxxxxxxx
> Subject: Re: [SLE] Duplicating a directory structure
>
> On Thursday 27 July 2006 2:11 pm, Marlier, Ian wrote:
> > I need to duplicate a directory structure on a SuSE 10.0 box -- not
the
> > files, just the directory tree.
> >
> > I thought this would be pretty simple, using find, but I'm running
into
> > big issues because many (as in almost all) of the directories have
> > spaces in their names. For the life of me I can't get the silly
thing
> > to put everything where it should be.
> >
> > The current directory structure is something like the following:
> > /tmp/origin
> > /tmp/origin/folder one
> Use the cp(1) command with the -r (recursive) option. Note that -p
also
> preserves permissions. Alternatively, rsync or even tar:
> cd /tmp
> mkdir /tmpdup
> tar cf - . | (cd /tmpdup;tar xf -)

Hrm...except that those are going to bring the files with them -- I just
want an empty directory tree.

Is there a flag for either tar or cp that tells it to only see/move
directories, and not files?

--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx


< Previous Next >