It can’t hurt to share some of you current helpers. Either someone else might get inspired by or in some cases you get suggestions how to make it better. Bash, Zsh, Fish or whatever shell script, command or alias (or abbreviation) you have, share here. Always fun to do so! I share mine in the comments, just like everybody else.


I actually never used the
-ioption on any of these commands. On one hand I do not like having default options for file operations like these. Especially so with remove command. However I have to say, the uppercase-Ionrmis quiet appealing, as it only kicks in with more than 3 files or when recursive. How you deal when you don’t need the interactive modes? My guess is just using a backslash like\rmin example, which will ignore aliases.I use the interactive as a safeguard. Nothing worse then typing rm accidentally. Better to have the yes/no pop up, review, ctl-c, up-ctrl-a--enter to put it into effect…or just hit y a few times if for just a few files.
Similar for cp, an overwrite is usually never intended, prefer to “are you sure” than find out much much later that was the wrong directory.
I totally agree, its a little bit dangerous. And understand why you add the safety net. My logic is, if you never take off the “training wheels”, you will never get a feeling how dangerous the commands are. I mean you are used to the safety net and your brain doesn’t have the same precautions and alarm bells active, as if there was none. And when you are on a machine without those, then you might quickly end up in an issue caused by muscle memory.
That’s my whole logic behind it, why I didn’t do any alias to the
rmcommand in example, even though I totally get and understand your point to be more careful. In fact, I’m so afraid of the command, that I sometimes just open up the GUI filemanager to delete files or folders, as I feel its more secure.BTW there is also a tool called trash-cli, which “deletes” (moves) files to the trash bin instead deleting them completely. Similar to how its done on the GUI. My original intention was to alias it to
rm, but after thinking this through decided against it with given reasons.