Possible bug that deletes all data in cwd except dst
Markus Niemi
mniemi at fastmail.com
Tue Oct 29 19:45:03 UTC 2024
alright, makes sense now thanks for the information
On Tue, Oct 29, 2024, at 21:32, Robin Lee Powell wrote:
> --exclude takes an argument, so "--exclude --exclude ." means
> "exclude files named --exclude, followed by . as a bare argument".
>
> So this is equivalent to: rsync -avh src dst .
>
> IOW, you're copying src and dst to the current directory.
>
> So, no, not a bug. Although --exclude throwing a warning when its
> argument starts with - would perhaps be reasonable.
>
> On Tue, Oct 29, 2024 at 08:30:31PM +0200, Markus Niemi via rsync wrote:
> > Hello,
> > Came across the following "sudo rsync -avh src/ dst --delete --exclude --exclude ." this will apparently delete everything in the current dir except for the dst dir, is this a bug?
> >
> > rsync version 3.2.7 protocol version 31
> >
> > Best regards
> > Mark
>
> > --
> > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20241029/c3b0e0ae/attachment.htm>
More information about the rsync
mailing list