[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync deletion target files



On 6/24/16, Cindy-Sue Causey <butterflybytes@gmail.com> wrote:
> On 6/3/16, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
>> rsync's `--delete' option works fine when the target directory is the
>> same
>> as
>> the sender one.  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 Mail News howto ...
>> /mnt/pendrive/rodolfo
>>
>> I'm copying various files from different places of my home directory to a
>> directory named `rodolfo' on the pendrive.  I want that all the files
>> that
>> are
>> not listed before `/mnt/pendrive' 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 so.
>
>
> I use "--delete --force" per just having stumbled upon it at some
> point out in the wilds of the Net. Is that maybe what you're looking
> for? I THINK.. sometimes it leaves my directories but wipes out
> everything within those directories.
>
> Hope that helps (someone at least). :)


I'm sorry. I wasn't thinking fully through. Your usage is definitely
different from mine. Because you're targeting specific things, that
"--force" may not apply, but still maybe it will lead you to something
similar that's appropriate for your usage need. I don't know how it is
now, but that "--force" was not in my manual at one point not too long
ago (not near my Debian to check out its current status).

That flag was, again, just something out on the Net. Made me wonder
what other undocumented tricks might be available out there as well as
that anywhere we reach out for tech support is subject to the
limitations of the combined knowledge of all the participants. :)

Cindy :)

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *


Reply to: