rm is for removing stuff. If you don’t want to remove the file, use mv. Take care when entering commands, if it’s important that you don’t mess up, spend an extra second. Don’t run around shooting rm -rf as super user. With great powers comes great responsibility.
Would be nice if filesystems were garbage collected, though. I don't see a fundamental reason why rm couldn't be undoable the second after you issue it.
Stop Using `rm` in Bash. Use `del`
11–20 of 76 posts
Re: Stop Using `rm` in Bash. Use `del`
#12I wish something like this were built into kernel filesystem driver. All deletions automatically go to this specific place in the filesystem.
Re: Stop Using `rm` in Bash. Use `del`
#13Re: Stop Using `rm` in Bash. Use `del`
#14Re: Stop Using `rm` in Bash. Use `del`
#15I wish something like this were built into kernel filesystem driver. All deletions automatically go to this specific place in the filesystem.
In seriousness tho, if you're ever wondering why such and such thing is not builtin into the kernel read up on separation of policy and mechanism eg:
https://en.m.wikipedia.org/wiki/Separation_of_mechanism_and_...
Re: Stop Using `rm` in Bash. Use `del`
#16It's great for the command line, but for scripting there are much better, cleaner, faster and safer alternatives.
Re: Stop Using `rm` in Bash. Use `del`
#17I've never liked the idea of a trashcan, and usually shift-delete when I'm in the gui. Deleting shouldn't be done casually, but a ui shouldn't second guess a user any more than it has to.
It's much less hazardous doing this when everything is in source control, though. :)
Re: Stop Using `rm` in Bash. Use `del`
#18Re: Stop Using `rm` in Bash. Use `del`
#19(setq delete-by-moving-to-trash t)
to achieve the same effect.
Re: Stop Using `rm` in Bash. Use `del`
#20My alias was for rm itself. I replaced it completely, as the habit of using rm is hard to forget. Today I don’t use an alias anymore.