[svlug] Re: [svlug]Re: how to copy a bunch of "." files?

Seth David Schoen schoen at loyalty.org
Thu Apr 27 09:06:48 PDT 2000

Bryan -TheBS- Smith writes:

> On Thu, 27 Apr 2000, Ian B MacLure wrote:
> > To copy the entire directory hierarchy below your PWD
> > cd to the directory you want to copy FROM
> > 
> > find . -print | cpio -dmpv <TO-DIRECTORY-PATH>
> Learn this by heart and you will be a successful UNIX admin. 
> Copiest everything exact, all files, all permissions.

Well, you could also

rsync -var . <dest>

nowadays.  rsync went and obsoleted a lot of beautiful pipe-tricks and
archive software. :-(

If rsync -a doesn't preserve enough file attributes for you, there are
moreoptions to preserve other things.

The cool thing about this is that, if you do it again later, it will
only need to copy the differences between the files.

Try it, you'll like it.

Seth David Schoen <schoen at loyalty.org>  | And do not say, I will study when I
Temp.  http://www.loyalty.org/~schoen/  | have leisure; for perhaps you will
down:  http://www.loyalty.org/   (CAF)  | not have leisure.  -- Pirke Avot 2:5

More information about the svlug mailing list