Copying a directory hierarchy
Singh, Ajith (ZA - Pietermaritzburg)
ASingh at DigitalXP.co.za
Wed Dec 22 15:10:52 PST 2004
Have you tried pax -rw . destination_dir ?
AJITH SINGH
Pietermaritzburg, South Africa
-----Original Message-----
From: owner-freebsd-questions at freebsd.org
[mailto:owner-freebsd-questions at freebsd.org] On Behalf Of Lowell Gilbert
Sent: 22 December 2004 03:51 PM
To: Mike Jeays
Cc: Robert Huff; freebsd-questions at freebsd.org
Subject: Re: Copying a directory hierarchy
Mike Jeays <Mike.Jeays at rogers.com> writes:
> On Tue, 2004-12-21 at 21:08, Robert Huff wrote:
> > Mike Jeays writes:
> >
> > > How does on copy a complete directory hierarchy, including any hidden
> > > files?
> > >
> > > "cp -rp" leaves them out.
> >
> > cp -rp *
> > cp -rp .*
> This doesn't copy hidden files in lower-level directories, only in the
> top level. Thanks for the suggestion - a good idea that doesn't quite
> do it.
It works for me...
temp> type -a rm
rm is /bin/rm
temp> mkdir -p a/b/c/d/e
temp> touch a/b/c/d/.hidden a/b/c/d/e/.hidden-too
temp> cp -r a f
temp> find a f
a
a/b
a/b/c
a/b/c/d
a/b/c/d/e
a/b/c/d/e/.hidden-too
a/b/c/d/.hidden
f
f/b
f/b/c
f/b/c/d
f/b/c/d/e
f/b/c/d/e/.hidden-too
f/b/c/d/.hidden
temp>
_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list