Most programs in use today have a built-in feature that keeps track of all the commands you use. This list of command history is helpful because you can use the history to see what's been done previously and to save time by executing commands again without having to reenter them.
Use History to List Command History
Step1 Hit 'RET' anywhere on a history line and the command will be added to the list of command history.
Step2 Head up through the command history list using C-p.
Step3 Scroll down the command history list using C-n.
Step4 View the first line in your command history by using M-<.
Step5 Jump quickly to the end of the current input line using M->.
Step6 Run an incremental search that will run backward from the current input history and will then move up the list of command history using C-r.
Step7 Perform a search that runs forward starting from the current input history, then down through the list of command history, using C-s.
Step8 Save yourself time and effort by simply using the arrow keys to move up and down through the command history list.
Step9 Write the command history list to the file using '-w'.
Step10 Use '-r' to read the file, but know that the contents of the current history list will be replaced.
Step11 Specify the number of history lines you want to view using n. The n lines will be counted from the most recent first.
Step12 Leave out numbers for history lines using '-q'. When you want to reuse the same command in another place, you do not want to include the line number.
Step13 Use the previous three commands again (without line numbers) by entering history--q 3. You save time by not having to rewrite those three lines. The more repetitive the commands used, the more time you save.
Step14 Run the history list by entering run_history. Edit the list of command history by entering the command edit_history.
How to Use History to List Command History
tags: Linux | author: chaoPosts Relacionados:
Subscribe to:
Post Comments (Atom)
0 comment:
Post a Comment