News for hackers. Stuff that matters.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @04:23AM (#11001221)
Lots of GNU/Linux distributions used to it by default, has it changed?
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @05:16AM (#11001360)
None I currently use (just tested with bash* on: Debian, Centos, Fedora, OpenWRT) or have used in the past few years (Arch) has it.

I don't remember anything about my time with SUSE and Ubuntu, thats way back.

* I normally use zsh with grmlzshrc and nearly no customization (which is why I love grmlzshrc -- usable defaults), which warns for `rm -rf foo/*` but not for `rm -rf foo`.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by SEJeff on Saturday January 30, 2016 @09:14AM (#11001856)
Redhat based distros absolutely do enable alias rm='rm -i' out of the box, but only for the root user. As a career SysAdmin, that seems like a good compromise. If you want to take the safety net off, you can escape out the alias (or any alias) with a slash i.e.:

\rm -rf somedir

Yet by default, if you don't include the "\", you get rm -i

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @11:17AM (#11002390)
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.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by SEJeff on Saturday January 30, 2016 @12:16PM (#11002685)
Actually 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'

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @12:28PM (#11002740)
> 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.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @06:03AM (#11001455)
Maybe I am wrong but I think Red-Hat, Mandrake and SuSE used to do it.

Nowadays I spend most of my time in Windows and mobile OSes to remember it properly.