3 ms·
You just gave me 2 more years back.
by dclowd9901 13y ago
You just gave me 2 more years back.
- mkenyon 13y agoBash/csh have a wonderful history expansion feature[0]. I can never remember all of the modifiers, but I am learning them slowly. [0]: https://www.gnu.org/software/bash/manual/bashref.html#Event-Designators https://www.gnu.org/software/bash/manual/bashref.html#Event-...
- joeblau 13y agoHeh, no problem here are 2 more bang tricks. !<charachters> runs the last command you ran that starts with the characters you type. !gre # will run the last command starting with gre (so probably grep) If you type history, then !<number to the left of the history command>, the shell will execute that command. $ history # shows command history $ !200 # executes command 200
- gburt 13y agoKeep them coming, imagine the manyears you're recovering!
- graue 13y agoYou can also press Up arrow, Ctrl-A to go back to the beginning of the line, add "sudo " and enter. This type of thing also works in most REPLs (Python, irb, Node, etc.)