The shell Linux/Unix provide several features saving time.
Thus, it is possible to go back in history with the recent orders navigation arrows by pressing the up arrow.
Moreover there are ways to access commands quickly in the history! By typing exclamation point (!) followed by the first letters of the command, the shell automatically runs the last command starting with those letters:
- Either the following history:
The following command allows you to access the command n-4 in
the history(vi /etc/apache/httpd.conf)
- Further application :
- !! //The last commant
- !23 //The 23th command
- !-2 // Execute the last command
- !?profil //The last command containing the word "profil"
- ^13^14^ //Substitution in the last command
- The history of command is registered at each end of session under the file:
- To avoid duplication in this file and history, add the line ~/.bash_profile in the command:
- export HISTCONTROL=ignoredups
- You can however display the search command function by pressing CTRL+R
Published by jak58
Latest update on March 13, 2010 at 06:42 AM by jak58.