Did you ever configure something and after a while you were not able to remember the exact syntax for the command?
If you used the bash shell, then the command history was your friend:
Everytime? Hmm no. Sometimes the command did not show up in the history. First guess:
If you work with multiple shells at the same time, then the history will be (over)written by closing the last shell.
But this can be avoided:
After adding the following to your .bashrc, you will never miss an entry again ;-):
If you used the bash shell, then the command history was your friend:
history|grep <part of command>and you got everytime the line with the right command back.
Everytime? Hmm no. Sometimes the command did not show up in the history. First guess:
HISTFILESIZEwas not big enough, but there is another option for missing entries:
If you work with multiple shells at the same time, then the history will be (over)written by closing the last shell.
But this can be avoided:
After adding the following to your .bashrc, you will never miss an entry again ;-):
shopt -s histappendFor more information of shopt take a look here.
this is included in my default .bashrc on Debian Lenny, but the problem persists :(
ReplyDeleteHi,
ReplyDeletei think, you tried the following:
* command1 in shell1
* command2 in shell2
* history in shell1
-> command2 is not there
Just try history in shell2 or in an new shell: command2 is there.....