Copying a directory hierarchy
Lowell Gilbert
freebsd-questions-local at be-well.ilk.org
Wed Dec 22 05:51:11 PST 2004
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>
More information about the freebsd-questions
mailing list