[SunHELP] local copying with regard to symlinks and speed

Jim Pennino jimp at specsol.com
Thu Oct 23 21:23:59 CDT 2003


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



More information about the SunHELP mailing list