Difference between revisions of "Expand your bash history to 2500"
From Brian Nelson Ramblings
(Created page with "==Expand your .bash_history to 2500== I do alot of testing and alot of work on Centos servers. I like to check my .bash_history for previous commands and to check what other...") |
(→Additional Articles) |
||
Line 30: | Line 30: | ||
===Additional Articles=== | ===Additional Articles=== | ||
+ | |||
+ | * [[Change the Timezone Centos]] | ||
+ | * [[Check the Version of Package]] | ||
+ | * [[How to install Sphinx on Centos Server]] | ||
+ | * [[How to install Redis on a Centos 6.4 Server]] | ||
+ | * [[Adding a New Disk Drive with Centos]] | ||
+ | * [[Creating Backups using rsync with Examples]] |
Revision as of 19:18, 15 December 2013
Contents
Expand your .bash_history to 2500
I do alot of testing and alot of work on Centos servers. I like to check my .bash_history for previous commands and to check what others have done on my server., The default .bash_history is set to 500 commands. So I wanted to expand this to include the last 2500 commands.
You can do this two ways:
Per User: Local .bashrc
If you are a single user on the system without sudo or root, you can adjust this value in your .bashrc file.
cd vim .bashrc
Add the following lines, remember you can make this any value, I just used 2500
HISTFILESIZE=2500
Per Server: Server wide bashrc
If you are the root user or have sudo you can edit the system wide bash file
vim /etc/bashrc
Now add the same line as above to the top of the file
HISTFILESIZE=2500
Now everyone will have a history of 2500 commands, unless they set it to something else