Comment by riffraff

8 months ago

I think a valid interpretation of GPs point could be that top-level folders should have special properties so that they're not at risk of a bad rm, e.g. xattr "unchangeable" flags.

The fact that you can accidentally nuke the system seems a remnant from the olden days which we should have corrected a long time ago.

(I think GNU did a valid mitigation with preserve-root, just musing philosophically.)

That's reasonable, I was mainly responding to this part

> Being special to just / doesn't make sense to me.

and explaining why being special to / can make sense. I too often feel like people see comments like that and decide to let perfect get in the way of better in their own work.

"immutable" top-level folders won't cut it. In order to recursively delete a folder, rm has to delete leaves first. So, you will endup with empty top-level folders, which is no better.