News for hackers. Stuff that matters.
Re:Devops/Sysadmin Cheatsheet by ineedtosleep on Friday January 11, 2013 @01:30PM (#5044158)
I've never had any incidents with `sudo !!`, however, I should point out that zsh (maybe other shells as well) replaces the `!!` with the full command and requires another press of Enter.

    $ rm -rf /root
    rm: cannot remove `root': Permission denied
    $ sudo !!  # Does not run this, but returns the line below.
    $ sudo rm -rf /root  # Then you say, "Wait I dont want to do this."
Re:Devops/Sysadmin Cheatsheet by chc on Friday January 11, 2013 @01:39PM (#5044211)
Interesting. Bash on my OS X box shows the command you're running, but doesn't give you a chance to cancel it. It looks like this:

  $ rm -rf /root
  rm: cannot remove `root': Permission denied
  $ sudo !!
  sudo rm -rf /root
  # /root is now kaput