Last active
July 25, 2018 03:05
-
-
Save weirdpattern/37a4924f89e8cd4dd4a59bafda15397d to your computer and use it in GitHub Desktop.
.2016.08.29.bang-command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016.08.29.bang-command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!<option>[:p] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment