Planning fixing '--force not working'

Chris Cogdon chris at
Thu Jan 3 11:04:44 EST 2002

On Wed, 2 Jan 2002, Dave Dykstra wrote:

> On Sun, Dec 23, 2001 at 02:07:06AM -0800, Chris Cogdon wrote:
> > 
> > Hi folks!
> > 
> > I'm in desperate need of getting the '--force' option working. I've 
> > written a jitterbug entry on this already #3500
> > 
> > Just curious to know if this is already being worked on, so I'm
> > not duplicating anyone's efforts if I was to try and work on this myself?
> > Or... will this be my first contribution to this fine program? :)
> No one is working on it.  In checking through my old email for the string
> "--force", I found a message from you in February 1999 where you were
> thinking --force would change the behavior of --delete which it doesn't.
> At that time I added a --delete-excluded option because of your case and
> several others; is that applicable for you here?  Probably not.  I'm not
> convinced that --force should delete in this case either, but if you come
> up with a patch I'll look at it closer and give my opinion on whether or
> not I think it should be accepted.  I'm not the official maintainer anymore
> so it will be up to Martin to make the final decision.
> Back in that time frame I had discovered that --force did very little and I
> was thinking about taking it out but instead I changed the man page entry.
> It used to make more of a difference back before rsync did a depth-first
> search for deletes.  I did find one case where it made a difference, but
> it's only when a file takes over a non-empty directory.

Thanks kindly for the response! I've not worked much on the problem yet: 
there's a lot of spin up time understanding the code, and the 
christmas/new year silliness took up a bit of time :)

However, I've also noticed that the only place that --force seems to make 
a difference isnt even being called. I think there's a lot of dead code in 
rsync, or code that is in dire need of consolidating :)

--force is indeed necessary, as it isn't entirely replaced by 
--delete-excluded. I think I detailed an example in #3500, but I'll 
reiterate here.

Say I'm mirroring a image website. Rather than mirror all the 
automatically-generated index files, I just mirror the images and have the 
local system generate the files straight after the rsync. However, if a 
directory is deleted (and its contents) on the source side, only the 
contents will be deleted on the destination side, since the index files 
are not deleted (without --delete-excluded), and therefore the directory 
is not empty. This is what --force is supposed to do, according to the man 
page :)

--delete-excluded is not the solution, as this will delete the index files 
on the destination each time rsync is run. I dont want to regenerate 
everything... only what's necessary to regenerate.

So... I'm putting my vote in into having --force kept, and fixed to do 
what's documented :) I'll continue trying to grok rsync to a point that I 
can supply patches.

If I have questions about the code, should i send them to you, or to the 
mailing list?

   ("`-/")_.-'"``-._        Chris Cogdon <chris at>
    . . `; -._    )-;-,_`)
   (v_,)'  _  )`-.\  ``-'
  _.- _..-_/ / ((.'
((,.-'   ((,/   fL

More information about the rsync mailing list