Adding prompt before overwrite feature in rsync

Lokesh Walase flokeshw24 at gmail.com
Sun May 12 05:16:30 MDT 2013


On Sat, May 11, 2013 at 7:54 PM, Scott Wiersdorf <scott at ipartner.net> wrote:

> On Sat, May 11, 2013 at 09:56:34AM +0530, Lokesh Walase wrote:
> > In "cp" command, we have "-i" option, which prompts before overwriting.
> > I read the man page of "rsync" and didnt find anything like that here.
> >
> > So I m interested in adding this feature to the "rsync" command.
> > I have downloaded the source code of "rsync" but I m confused from where
> to
> > start and what to read.
>
> This could turn a large sync into an aborted nightmare; I would
> recommend perhaps instead writing a shell script (for example) that
> would first do a --dry-run with --itemize-changes, parse that and
> present it to the user for confirmation if any file changes are
> detected. If the confirmation is given, re-run everything without the
> --dry-run, otherwise exit.
>

Thanks Scott for the suggestion, sounds cool :)
Will implement it  !!



> Scott
> --
> Scott Wiersdorf
> scott at ipartner.net
> --
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>



-- 
Lokesh Walase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20130512/9846ac3b/attachment.html>


More information about the rsync mailing list