[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what will happen to the --reply option?
From: |
Mark Rose |
Subject: |
Re: what will happen to the --reply option? |
Date: |
Sun, 26 Aug 2007 00:56:23 -0600 |
User-agent: |
KMail/1.9.7 |
Yeah, that's exactly the feature I've been wanting (only with mv instead of
cp). I actually joined this list to figure out why it had been deprecated.
One day, when I have time to fully understand the source code, I'll sit down
and write a "--no-overwrite" patch for mv and cp that silently ignores
moving/copying files when a file with the same name exists at the
destination.
--Mark
On Saturday 25 August 2007 11:57:55 pm alessandro salvatori wrote:
> 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
Re: what will happen to the --reply option?, alessandro salvatori, 2007/08/26