[Ma-linux] Having problems copying data using cp over nfs
donjr
djr1952 at hotpop.com
Tue Jun 19 12:36:21 EDT 2007
On Tue, 2007-06-19 at 11:16 -0400, Przemek Klosowski wrote:
> BTW, I use cp -a which is a shortcut for cp -dpR. IT preserves the times
> which is useful.
>
> Ah, and try
>
> tar -C /home/jhart -cf - Maildir | tar -C /mntpoint/email/home/jhart -xf -
>
> which creates an archive on the fly, and is a good idiom to learn
> because it uses the filesystem more effectively, especially when you
> copy across the network (the latencies on both ends overlap for much
> better throughput).
I like that even better them my version of almost then same thing.
$ WRK="/home/jhart/Maildir"
$ (cd $WRK && tar cf - . ) | (cd /mntpoint/email/$WRK && tar xvfp - )
And the '-C' effect makes it even be easier to combined with ssh:
tar -C /home/jhart -cf - Maildir | ssh HOST "tar -C /home/jhart -xf -"
--
--
Don E. Groves, Jr.
$ /usr/games/fortune :
Q: Where's the Lone Ranger take his garbage?
A: To the dump, to the dump, to the dump dump dump!
Q: What's the Pink Panther say when he steps on an ant hill?
A: Dead ant, dead ant, dead ant dead ant dead ant...
More information about the Ma-linux
mailing list