3 ms·
I would never get the habit of using !! with sudo. I want to read what I do, before doing root commands... (Alt-. is possible, I guess. Maybe.) But I'm an epic
by berntb 10y ago
I would never get the habit of using !! with sudo. I want to read what I do, before doing root commands... (Alt-. is possible, I guess. Maybe.)
But I'm an epic coward that even looks both to the left and the right before crossing a street. :-)
- p4bl0 10y agoIn addition to never use `sudo !!`, on systems that I use, the sudo is aliased to the following shell script: #!/bin/bash echo -n "Are you SURE you dumbass? [N/y] " >/dev/stderr read -n 1 if [ "$REPLY" = "y" ]; then echo >/dev/stderr exec /usr/bin/sudo "$@" else exec echo -e "\n:-)" >/dev/stderr fi That way even if I already typed my password, I systematically get asked if I'm sure I want to execute the command.