Deletion of destination files

Kevin Korb kmk at sanitarium.net
Sun Jun 5 18:28:17 UTC 2016


See --delete-missing-args (a fairly new feature)

On 06/05/2016 06:40 AM, Rodolfo Medina wrote:
> Hi to all rsync users.
> 
> rsync's `--delete' option works fine in the following example: I'm sending all
> the content of /home/rodolfo from machine1 to /home/rodolfo in machine2:
> 
>  $ rsync --dry-run -vrtul --delete --exclude='/.*' . 192.168.0.2:/home/rodolfo
> 
> , and --delete works perfectly.  Instead, in this other example:
> 
>  $ rsync --dry-run -vrt --delete --modify-window=1 file1 file2 file3
> ... /mnt/pendrive/rodolfo
> 
> I'm copying various files and directories from different places of my home
> directory to a directory named `rodolfo' which is on the pendrive.  I want that
> all the files that are not listed among `file1 file2 file3 ...' in the above
> command were deleted in the destination, but this does not happen.  In rsync
> `man' page I can't find a solution.  Please, whoever can, any suggestion about
> how to do what I want.
> 
> Thanks in advance for any help,
> 
> Rodolfo
> 
> 

-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/rsync/attachments/20160605/0da1d344/signature.sig>


More information about the rsync mailing list