[SunHELP] syncing/copying files

David Bishop sunhelp at sunhelp.org
Tue Oct 9 16:25:48 CDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Thanks to everyone who suggested using rsync/rdist.  Simply replacing "cp" 
with "rsync" did the job.  'Tis always the easy things in life that bite us 
in the butt :-)

D.A.Bishop

On Monday 08 October 2001 12:39 am, kumar_bageshwar at jpmorgan.com wrote:
> U can do this using rdist
>
> David Bishop wrote:
>
> I am tasked with syncing two directorys, sort of.  I have a large directory
> with a ton of files (10K+) of which I want a subsection copied over to
> another directory.  Luckily, all the files I want to move are prefaced by
> known strings (foo, bar, boz), so I wrote a 5 line perl script that slurps
> up
> a config file that lists all the prefaces we want to copy, then does a
>
> foreach $preface ($blah){sytem("cp $preface* /target") or die;}.
>
> That works great.  However, next time I run the script, it copies all the
> same files over again, plus the few additional files.  This is significant
> because even the subsection is 1500+. My question is: how do I copy only
> the
> new files?  I couldn't find an option in man|info cp that would look to see
> if the files are already there and skip if they are, though there are a ton
> of 'overwrite|symlink|hardlink|whatever' options.  Has anyone done this
> before?  Am I using the Right Tool for the Right Job?  Any help would be
> greatly appreciated.

- -- 
D.A.Bishop
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7w2tdEHLN/FXAbC0RAvl3AJwKemxNTwjMzrh0NNsnOl3qDKQlWACggSy3
u6HQnv6v3l2OwPrVfzqnF9U=
=3Y1r
-----END PGP SIGNATURE-----



More information about the SunHELP mailing list