12th May, 2009

How to change the size of the history in Linux

1 Star2 Stars3 Stars4 Stars5 Stars (Nessun voto)
Loading ... Loading ...

Go to your home folder and open with a text editor (I will use vim) the .profile or the .bashrc_profile file.

# Go to your home folder, that is /home/username
cd ~ 
# Now edit your profile. 
# You can edit the file 
# .bashrc_profile if you prefer
vim .profile

Add the following line to your file, then save it and close it:

HISTSIZE=1000

Finally, type in your terminal:

source .profile

Now your history is set to 1000!
You can print the value in order to be sure:

# Print the file of the history
echo $HISTFILE
# Print the size of the history
echo $HISTSIZE





Leave a response

Your response:

Categories