4 ms·
You're right about RedHat, sorry. .bash_history says I accidentally added `-f` on that host. I should have just checked with `which` instead of trying it out.
by Ao7bei3s 11y ago
You're right about RedHat, sorry.
.bash_history says I accidentally added `-f` on that host. I should have just checked with `which` instead of trying it out. Oops.
- SEJeff 11y agoActually even if you do rm -f, the -i will still be added if it is an alias. Better is to use the bash builtin "type": type rm is better than which rm, but it depends on what distro you're using. Some distros (Just checked on RHEL7) will fancify which as well ie: $ type which which is aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
- Ao7bei3s 11y ago> Actually even if you do rm -f, the -i will still be added if it is an alias. Yes, I know, but rm ignores -i if -f is given. [root@example ~]# touch blah [root@example ~]# rm -i -f blah [root@example ~]# And hence: [root@example ~]# which rm alias rm='rm -i' /usr/bin/rm [root@example ~]# touch blah [root@example ~]# rm -f blah [root@example ~]# @type: yes, you're right, thanks for the reminder.