4 ms·
This can be a pain if you're deleting many files, but alias rm='rm -i' has worked for me.
by mykowebhn 8y ago
This can be a pain if you're deleting many files, but
alias rm='rm -i'
has worked for me.
- raibosome 8y agoOkay I think this is more elegant than my workaround. But it doesn’t work for directories, does it?
- mykowebhn 8y agoWhen I execute "rm -r" with that alias, it does prompt me before deleting directories, at least on Mac OS.
- mykowebhn 8y agoBTW, if I'm absolutely sure I want to delete all the files in a directory and all subdirectories, and I don't want to bother with a gazillion prompts, I can override the alias with a backslash, as in "\rm -r *". Use with extreme caution, though. Otherwise, your solution of putting into Trash is probably better and safer.