I sometimes use a wrapper around mv that moves the folder to trash. Guess it's not that portable but it could be replaced by moving to /tmp or something instead perhaps.
Ah. It seems I have just described 'safe-rm'.
Great minds etc :)
Great minds etc :)
It could be something as simple as a file with paths on each line it - match one path or a path with a glob - and the script fails before destroying anything important.
Overriding it might involve adding a --override=/path/to/something but at least then it would be very explicit