bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp -u


From: Bob Proulx
Subject: Re: cp -u
Date: Sat, 14 Jun 2008 11:54:13 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Markku A. Mähönen wrote:
> You don't get the exit code, if the system boots while 'cp -u'

At that point the computational model of the machine is broken and
there isn't anything that will protect you against file corruption.
But you mentioned interrupted and therefore normal SIGINT came to
mind.

Once again rsync is your friend in those situations because it can be
used to replicate a source file to a target file using specified rules
(e.g. timestamp, size, checksum) which will ensure that the file
corruption is corrected.  Also rsync by default will perform the copy
to a temporary file name before renaming it into place.  If the power
cord is pulled out midway through the copy a temporary file will be
left but not a partial target file.

Bob




reply via email to

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