Run the Last Command Again


!!

If you want to run the last command you used a second time, enter two exclamation points. That looks in the history file and runs the last command in the list.

$ pwd /home/scott $ !! pwd /home/scott 


Notice that you first see the actual command that's going to run, and then the results of that command. This is a truly useful way to have your computer do tedious work for you.



Linux Phrasebook
Linux Phrasebook
ISBN: 0672328380
EAN: 2147483647
Year: 2007
Pages: 288

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net