The -depth option is completely broken in GNU find 4.1
Here is a minimal example that will illustrate the bug: run
mkdir /tmp/foo ;
echo Blah > /tmp/foo/bar ;
find /tmp/foo -depth -empty
and the program will respond
find: /tmp/foo: Not a directory
this is evidently bogus.
I have submitted a bug-report to the FSF about this, but since the latest
version of findutils dates from 1994, it is rather dubious that anyone will
ever look into it.
I have written a (trivial) patch of my own that will correct the problem:
it is available at
furthermore, there is a source and (Intel) binary RPM that includes this fix:
Created attachment 1167 [details]
Trivial patch that solves the bug
fixed for 7.0.