Domain hosting, cheap domain names & web page promotion services
  

 Home

Red Hat Linux 8.0: The Official Red Hat Linux Getting Started Guide
PrevChapter 14. Frequently Asked QuestionsNext

Tips on Using Command History

What are some other ways I can use command history?

If you type history, you will see a numbered list scroll by very quickly, showing you the previous 500 commands you have used.

You probably do not need to see all of the last 500 commands, so the command history 20 might be useful. This way, only the previous 20 commands you typed will display (you can use any quantity as an argument of the history command).

Other Shortcuts

Here are other command history shortcuts which may be useful to you:

  • "Bang, bang": Typing !! (called "bang bang") executes the last command in the history.

  • "Bang number": Typing !number (as in !302) will execute the command which is numbered 302 in the history file.

  • "Bang string": Typing !string (as in !rpm) will execute a command with the most recent matching string from the history file.

  • [Up arrow] and[ down arrow]: At the shell or GUI terminal prompt, you can simply press the up arrow to move back through previous commands in your history list (the down arrow will move you forward through the commands) until you find the command you want. Press [Enter] to execute the command, just as if you had typed it on the command line.


PrevHomeNext
Finding Commands QuicklyUpKeep ls Output from Scrolling
 

 

 

 

Seosubmit.com: Web site promotion | Domain register and transfer | Buy cheap domain name 

Disclaimer: For authoritative source or latest update to this documentation, please refer to http://www.redhat.com/docs/manuals/linux/

 

 
Quotes: It's not whether you get knocked down; it's whether you get back up.