How do I find the last executed command in Unix?

How do I find the last executed command in Unix?
Answer
Following are the 4 different ways to repeat the last executed command.
  1. Use the up arrow to view the previous command and press enter to execute it.
  2. Type !! and press enter from the command line.
  3. Type !- 1 and press enter from the command line.
  4. Press Control+P will display the previous command, press enter to execute it.
11 авг. 2008 г.
 

Tìm kiếm

Back
Top