Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
.2016.08.29.bang-command
2016.08.29.bang-command
$ cd /
# try to create test in /
$ mkdir test
mkdir: test: Permission denied
# execute the last command adding sudo
$ sudo !!
sudo mkdir test
# execute the last command replacing test for test2
$ sudo !:1 test2
sudo mkdir test2
!<option>[:p]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.