bug-coreutils
[Top][All Lists]
Advanced

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

Re: what will happen to the --reply option?


From: alessandro salvatori
Subject: Re: what will happen to the --reply option?
Date: Sat, 25 Aug 2007 22:57:55 -0700

My case is the exact opposite of what you are talking about.
Irrespectively of the original files, i want to keep the existing files at
the destination, even if older.

and cp --reply=no, without any other fancy thing that would have avoided a
prompt, was the sweetest thing to do. it was... :(

cheers
-Alessandro

On 8/25/07, Bob Proulx <address@hidden> wrote:
>
> Eric Blake wrote:
> > Why not use "rsync --ignore-existing" instead?
>
> Agreed that rsync is definitely the right tool for this task.
>
> Most of the time when people are trying to avoid overwriting existing
> files it is because they are trying to avoid spending the computer
> time to do the copy again and not trying to avoid changing the file
> again.  A large directory of large files, say a photo gallery, can
> take a long time to complete a full copy for example.  In which case I
> would not use the rsync --ignore-existing option even though it does
> exactly answer the question.  That would not sync the file if the file
> were different.  Instead I would simply let rsync determine that the
> file has been copied correctly previously and skip copying it a second
> time.  This is the sweet spot for rsync.
>
> To have rsync do this optimization the timestamp must be copied.  That
> means that -t option must be present otherwise rsync acts similarly to
> cp and the file will have a current timestamp.  I prefer -a because it
> does the right thing and is equivalent to the -rlptgoD options.
>
>   rsync -a source/ destination/
>
> I prefer to use source to destdir/
>
>   rsync -a /path/to/src/somedir /path/to/dst/
>
> That would result in /path/to/dst/somedir when the rsync is finished.
>
> Bob
>



-- 
Anche i masochisti confessano se torturati. Lo fanno per riconoscenza.
(Stanislaw J. Lec)

A l  e   s    s     a      n       d        r         o
         S        a       l      v     a    t   o  r i


reply via email to

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