[SunHELP] syncing/copying files

P Nutton sunhelp at sunhelp.org
Tue Oct 9 03:48:19 CDT 2001


> From: David Bishop <tech at bishop.dhs.org>
> 
> 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.

Hi,

I just use filesync, out of the box solaris, seems to work ok, I have used
it on directories up to 30 GB, 1 Mfiles or more. Not wonderfully fast
though....
-- 
Paul Nutton
--
_______________________________________________________________________________

The information in this email and in any attachment(s) is commercial in confidence. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the information in it is strictly prohibited.  Please notify us immediately by email at intadmin at awe.co.uk, and then delete this message from your computer.  While attachments are virus checked, AWE plc does not accept any liability in respect of any virus which is not detected.



More information about the SunHELP mailing list