bin/166554: find -delete is silent when failing to rmdir nonempty
rjk at greenend.org.uk
Sun Apr 1 09:30:13 UTC 2012
>Synopsis: find -delete is silent when failing to rmdir nonempty directories
>Arrival-Date: Sun Apr 01 09:30:13 UTC 2012
>Originator: Richard Kettlewell
find -delete is documented as removing files and/or directories. However since it uses rmdir() it cannot remove nonempty directories. This is fine, but it suppresses the error message in this case. This leads to considerable user confusion.
I suggest that:
1. The limitation that it can only remove nonempty directories be documented.
2. The error message not be suppressed (i.e. that the ENOTEMPTY test be removed).
GNU find -delete does produce an error message in this case.
-delete seems to be an extension compare to SUS find, so I don't believe there are any standards-compliance questions here.
More information about the freebsd-bugs