Guis know this, but somehow this piece of UX is forgotten on command line tools.
Guis know this, but somehow this piece of UX is forgotten on command line tools.
Just because you protect one "rm" command doesn't mean there isn't another. Someone might have used unlink() in a Perl script or a C program. Maybe "mv" was used to write one file over another, or "cat >! filename", or a dozen other things.
In the end, if a file needs to be safe then it needs a backup (and the sooner it can be restored, the better). And then given a good backup the file still needs an appropriate Unix group, owner, file access control list, etc. to minimize the chance that you'll ever need the backup.
Because command line tools were first, and are used by people who do need to remove files, to clear disk space.
If you're never deleting anything, how do you clear disk space?