Hacker News new | ask | show | jobs
by lowkey 2527 days ago
sudo !! to run the previous command as sudo (so useful when you forgot to sudo a long command)
2 comments

silly tip: alias fucking=sudo

  $ rm file
  > denied
  $ fucking rm file

  $ rm file
  > denied
  $ fucking !!
Hmmm.
Also `<cmd> !$` to run a new command with the same argument as the previous command.