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

Seth David Schoen schoen at loyalty.org
Fri Apr 28 17:50:19 PDT 2000


Marc Merlin writes:

> On jeu, avr 27, 2000 at 11:04:01 -0400, Bryan -TheBS- Smith wrote:
> > 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.
> 
> Why bother?
> cp -a source dest
> 
> It's just like the tar cf - | (cd dest; tar xvf -), it's really useless when
> you have GNU cp.

That was useful before rsync when you put an ssh in there:

(sleep 10; tar cf -) | ssh somewhere 'cd /here; tar xvf -'

Actually, I'm sure rsync had been released by the time I learned that
ssh pipe stuff, but it takes a while for the file-copying tricks to
synchronize over the network. :-)

-- 
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