[SunHELP] local copying with regard to symlinks and speed
sunhelp at sunhelp.org
sunhelp at sunhelp.org
Thu Oct 23 22:22:02 CDT 2003
cd sourcedir; find . ! -local -prune -o -depth -print | cpio -pdlmV
targetdir
I noticed the man page states the -prune has no effect if -depth is used,
but
from what I can see from the find output, It is NOT following my
nfs mounts, ~which is what I want~! The -l cpio switch appears to recreate
the links which is good.
Thanks for your help.
-----Original Message-----
From: Jim Pennino [mailto:jimp at specsol.com]
Sent: Thursday, October 23, 2003 10:24 PM
To: The SunHELP List
Subject: Re: [SunHELP] local copying with regard to symlinks and speed
On Thu, Oct 23, 2003 at 09:55:41PM -0400, Markham, Richard wrote:
> I'd like anyone's opinion on local copying of large amounts of files from
> one directory to another,
> same owner. cp doesn't cut it since it will copy the file that a link
points
> to as opposed to the
> link itself. I currently use: cd <directory>; tar cpf - . | ( cd /newdir
&&
> tar xpf - ). This
> handles the links find, but I'm curious if I can acheive faster results
> using another method.
> Maybe gtar is an option?
>
> Thanks for any input.
>
> Solaris 8
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
cd <directory>
find . -depth -print | cpio -pdm <new_directory>
See man cpio for options to handle links the way you want, see man find
for options to handle subdirectories the way you want.
--
Jim Pennino
_______________________________________________
SunHELP maillist - SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp
More information about the SunHELP
mailing list