<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sun, Jun 5, 2016 at 6:39 AM, Steven Levine <span dir="ltr"><<a href="mailto:steve53@earthlink.net" target="_blank">steve53@earthlink.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">> $ rsync --dry-run -vrt --delete --modify-window=1 file1 file2 file3 ...<br>
>/mnt/pendrive/rodolfo<br>
<br>
>not happen.  In rsync `man' page I can't find a solution.<br></blockquote><div><br></div></span><div>From the man page's description of --delete:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">This tells rsync to delete extraneous files from the receiving side (ones that aren’t on the sending side), but only for the directories that are being synchronized. You must have asked rsync to send the whole directory (e.g. "dir" or "dir/") without using a wildcard for the directory’s contents (e.g. "dir/*") since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not the files’ parent directory.</blockquote><div><br></div><div>You didn't ask rsync to send a directory, so it can't do any deletions. You should instead use filter rules to include what you want to send from a particular directory and hide everything else (or use an exclude combined with --delete-excluded):</div><div><br></div><div><font face="monospace, monospace">rsync -aiv --del -@1 -f'+ /file1' -f'+ /file2</font><span style="font-family:monospace,monospace">' -f'+ </span><font face="monospace, monospace">/file3' -f'H *' ./ /mnt/pendrive/rodolfo</font></div><div><br></div><div>You could also combine all the filter rules into a single file and tell rsync to read that instead of specifying them all on the command-line.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>..wayne..</div></font></span></div></div></div>
</div><br></div>