2008/6/14 Bob Proulx <[EMAIL PROTECTED]>:
> 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 i
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.
2008/6/14 Bob Proulx <[EMAIL PROTECTED]>:
>
> Therefore the caller *must* check the exit code and handle errors
> appropriately if it cares about them. I suspect that your backup
> script is not checking the exit code from cp and therefore not
> handling the original interrupt condition.
>
You d
Markku A. Mähönen wrote:
> 2008/6/14 Philip Rowlands <[EMAIL PROTECTED]>:
> > 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
2008/6/14 Philip Rowlands <[EMAIL PROTECTED]>:
>
> 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
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 t
[EMAIL PROTECTED] (Michael Geng) wrote:
> when I posted a patch around Christmas which showed how genparse
> could generate the parser code for the ping command of the inetutils
> Alfred Szmidt replied that in that example there are 2 loops (see
> http://lists.gnu.org/archive/html/bug-inetutils/200
"Markku A. Mähönen" <[EMAIL PROTECTED]> writes:
> 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.
A much better way to do what you want is to use rsync, which offers
Hi!
I'm using Ubuntu version 8.04, kernel 2.6.24-19-generic. I have done some
simple backups of directories using 'cp -u' that updates the files, if
source is newer than the destination (or if destination file is missing).
I noticed that if, for some reason, the copy of a file is interrupted (and