Skip to content

Instantly share code, notes, and snippets.

@weirdpattern
Last active July 25, 2018 03:05
Show Gist options
  • Save weirdpattern/37a4924f89e8cd4dd4a59bafda15397d to your computer and use it in GitHub Desktop.
Save weirdpattern/37a4924f89e8cd4dd4a59bafda15397d to your computer and use it in GitHub Desktop.
.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