43 ms·
In 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 du
by p4bl0 10y ago
In 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.