On 08/02/2015 10:15 AM, Paul Eggert wrote:
> Linda Walsh wrote:
>> find, by itself, has no way to remove all of the items under a
>> tree even if you own them all.
>
> That's not a problem. Have 'find' call 'rm'. Something like this, say:
>
> find . ! -name . -prune -exec rm -fr {} +
>
> So there's no need to change 'rm'.
+1
Adding additional code to find out if the file to remove is still on the
same file system would add bloat, and would open another can of worms:
corner cases, races and a big performance penalty. E.g. one might blindly
assume that only directories are mount points, but in reality also a
regular file can be 'over-mounted'.
Have a nice day,
Berny