[TriLUG] copying files

Joseph Mack NA3T jmack at wm7d.net
Tue Jun 19 21:39:13 EDT 2012


On Tue, 19 Jun 2012, Jeff Schornick wrote:

> If you skip NFS and use rsync via SSH, it'll construct 
> both file lists locally instead of over NFS (which is 
> slow).  The rsync algorithm to diff these lists is very 
> efficient.

I haven't used rsync. So after the initial phase, both ends 
know the files at each end and when I add a new file at one 
end, rsync will notice and just handle it?

> However, to avoid the remote compare entirely, you probably just want
> find + cpio (in copy-pass mode).  Example:
>
> $ find . -mtime -5 -type f -print0 | cpio --null -pvd /nfsdir/
>
> The "-d" flag of cpio does your directory creation.  If you don't like
> cpio, you could coax tar into doing something similar, I imagine.

I know there are cpio experts, who use it all the time, to 
do all sorts of things, but I've never used it. I'm not 
against cpio, it was just something that seemed to be from 
an earlier era, that I never learned.

Now that you mention it, I use tar to copy directory trees 
to new locations. But I didn't think of it for just a couple 
of files.

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list