upvote
> Also, perhaps `rm` should be molly guarded to move things to the trash on all systems by default, and delete only if forced to by a flag.

Not all systems, but some (RHEL, I think?) default alias rm='rm -i', yes

reply
disk space is cheap these days alias to mv to trash for an extra layer of protection.
reply
Seeing long presses implemented for those intermittent and irreversible actions in games is something I‘ve always appreciated. I often end up making errant inputs, especially on keyboards.

A guard I often make for myself is removing/disabling the delete key on my keyboard, and setting FN+Backspace to Delete with whatever control software is involved. I often then repurpose the delete key location to F2, which is typically used to “Edit” a spreadsheet cell or file name.

reply
deleted
reply
rm has mollyguarding, that's why every invocation of rm you see on the internet is followed by -f
reply
I think that may be a combination of (IMHO unfortunate) factors:

* Yes, on some systems rm is aliased to rm -i by default.

* Some scripts will use rm -f because normal rm returns an error if the target already doesn't exist but -f doesn't care.

* Finally, sometimes files are just ... I think it's being marked read-only that does it? I've hit this while trying to rm a git checkout; you actually do need to add -f sometimes to succeed. So if you just add -f then it'll always work.

reply