Adding prompt before overwrite feature in rsync

Lokesh Walase flokeshw24 at gmail.com
Tue May 14 23:50:35 MDT 2013


On Wed, May 15, 2013 at 11:17 AM, Lokesh Walase <flokeshw24 at gmail.com>wrote:

>
>
>
> On Sun, May 12, 2013 at 4:46 PM, Lokesh Walase <flokeshw24 at gmail.com>wrote:
>
>>
>>
>>
>> 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.
>>>
>>
Here is a simple bash code that implements the suggestion of Scott.
https://github.com/lokeshw24/rsync_parser

Any suggestions are welcome.

>
> 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
>>
>
>
>
> --
> Lokesh Walase
>



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


More information about the rsync mailing list