[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cp -u
From: |
Philip Rowlands |
Subject: |
Re: cp -u |
Date: |
Sat, 14 Jun 2008 14:55:25 +0100 (BST) |
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
- cp -u, Markku A. Mähönen, 2008/06/14
- Re: cp -u, Andreas Schwab, 2008/06/14
- Re: cp -u,
Philip Rowlands <=