You know how you’ve been getting a new system up and running, and then you break something and just can’t remember how you got it working the first time?
Well, Linux has a solution for that. Commands you use on the bash shell is stored in history.
To view your history, just type
history |
If you want to search for something specific you did, you can use grep. Eg:
history | grep -i some_command |
To save your history to a file use :
history -w ~/history.txt |
then feel free to open with your favourite text editor.
Bash keeps it’s own history in a file. You can view that file by opening ~./bash_history
Now to change your bash history length, just open up your .bashrc by doing so:
gedit ~/.bashrc |
Once open, at the top add
export HISTFILESIZE=3000

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 