[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileUtils additions

From: Jonas Eckerman
Subject: FileUtils additions
Date: Fri, 23 May 2003 13:07:11 +0200


I have added two switches to cp.s in the FileUtils package.

The switches are

Inserts a delay after each block copied in copy_reg()

Limits the size of the buffer used in copy_reg()

The idea behind both those options is to be able to copy large amounts of data 
without overloading a network or a machine with slow disks. When a copy simply 
has to be made but the time it takes is unimportant it can be nice to be able 
to do it without making things slower for others using the network or the 
machine. It's also good when a machine has a bad NIC or faulty NIC drivers.

I don't really know C++ so my changes might not be done in a good way, and 
therefore I'm not sending any diffs but am attaching the complete source for 
the modified files instead. I really think someone who does know C++ should 
look at it before deciding if it's something to spread to others as well.

All changes in the source can be easily find by seraching for "slow" and 
"buffer". The only change in mv.c is that both options are set to 0 when the 
options are initiated. I probably should make the same mods to mv.c as I did to 

I'm thinking of trying to add a third special option as well.

 --update-sync or whatever:
Copies the file if the destination does not exist or is not the same ("same" 
means having the same datetime and size).
It should probably be used with switches setting the datetime of the copy to 
the same as the source.

Not sure when I'll do this though. The simple fact that I don't know C++ and is 
not a Unix programmer means I'd first have to teach myself how to do this.

Jonas Eckerman, address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]