On Sat, 14 Jun 2008, Markku A. Mähönen wrote:
I noticed that if, for some reason, the copy of a file is interrupted
(and so the destination file is not the same size as the source) and
after that you do 'cp -u' again it does not update the interrupted
file. So the 'cp -u' does not care about the file size mismatch and
cares only about the timestamps.
So I would like to suggest that 'cp -u' should also check the size of
the files and do a copy if source is newer, or if destination is
missing, or if file sizes are different.
You might find rsync to be a better tool for this task. It's more robust
against partial-copy failures, and has the nice property that copied
files will all carry the same mtime, whereas cp -u will not attempt to
replicate timestamps (from a cursory check).
Cheers,
Phil
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils