The shell's history
The shell remembers the history of your last typed commands. It is what you see when you use the up and down keys in Bash.
There are plenty of ways to use this history! I will write some tips here that I know but don't hesitate to add more in comments.
- the ! tip: starting a line by ! followed by the first few letters of a previous command recalls it, very useful !
- ! followed by a number recalls this command.
- the !? tip: is somewhat similar but doesn't only look at command starting with the following letters but containing them !
- '#' comments the commands but still records it. (if you have something to check while typing a long command)
- of course the history command shows you the last commands ;)
- [ctrl-r] put you in history mode
- if you don't like this feature, you can filter it with HISTIGNORE
export HISTIGNORE="&:ls:\[bf\]g:exit"
And if you include the expression "[ t]*" in the HISTIGNORE string, you can suppress history recording at will for any given command just by starting with a space!
- more info here
Mandriva Club Tips > Mandriva Club Tips > Mandriva Club Tips > Mandriva Club Tips > Mandriva Club Tips > Mandriva Club Tips > L'historique du shell
Version 1.8 last modified by Arkub on 15/08/2006 at 15:40
Version 1.8 last modified by Arkub on 15/08/2006 at 15:40
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Comments (1)