4 ms·
FYI, in bash, "sudo !!" re-runs the previous command with sudo.
by nfriedly 7y ago
FYI, in bash, "sudo !!" re-runs the previous command with sudo.
- papln 7y agoThat's not "funny" enough, unless the "!!" is replaced by an emoji.
- blacksmith_tb 7y agoI use it all the time! But also worth remembering that !$ is the object of your last command, so you could do something like cp /some/tortured/path/to/file.txt /some/other/path/file.txt chown myuser:myuser !$
- gitgud 7y agoThanks for that little tip! It's a constant mistype for me... $ apt install something E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?