View Full Version : Log File Question
lurch
01-31-2007, 04:26 PM
I am probably missing the obvious but, does anyone know the name of the file that records the commands typed in a terminal? Also, is there a limit to how many commands can be stored in that file?
Phillip.
bhobjj
01-31-2007, 07:56 PM
History
the info is kept in a hidden file in your home directory:
.bash_history
the default is the last 500 commands but you can modify it.
Try typing:
$ history
http://www.gnu.org/software/bash/manual/bashref.html#SEC114
http://tldp.org/LDP/abs/html/histcommands.html
http://www.ducea.com/2006/05/15/linux-tips-take-control-of-your-bash_history/
lurch
01-31-2007, 08:13 PM
Thanks bhobjj. Looks Like I did miss the obvious.
uteck
01-31-2007, 09:51 PM
A few uses of history.
You can run a command from history by typing ! followed by the line number from history. To run the command on line 367 type; !367.
You can get a similar affect by typing ! and the first part of a command that was recently run. So, instead of looking through history or up arrowing till you find the command, I can type; !transcode to run the huge transcode command and arguments I last ran. But this just grabs the last use of that command.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.