rm misbehavior

Ralf Mardorf kde.lists at yahoo.com
Mon Dec 30 17:49:43 UTC 2024


On Sun, 2024-12-29 at 18:51 -0500, Paul Smith wrote:
> This is why I've always hated it that RHEL aliases rm to "rm -i" by
> default.
> 
> It's just (IMO) a terrible, dangerous approach.
> 
> Instead, they should have created a new alias like "rmi" or something
> and encouraged everyone to get used to running that instead of "rm". 
> Then at worst someone would get an "command not found" error if the
> aliases are not available.

+1000

I always manually type the -i option for rm, mv and friends.

I'm only using freaky aliases for harmless commands, such as

$ command -v ls
alias ls='lsd'

or for stuff I don't remember, such as

$ command -v sudo-reset 
alias sudo-reset='faillock --user $(id -un) --reset'

rm and -f option or rm as root are tricky. I hate to remove e.g.
fake-root stuff. We are humans and it's easy to make a mistake.

However, no one should get used to an alias or function that is a nanny.
In my experiences this only makes our handicap worse.




More information about the ubuntu-users mailing list