LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Save your own bash history permanently? (https://www.linuxquestions.org/questions/programming-9/save-your-own-bash-history-permanently-836836/)

frozenQueue 10-07-2010 05:18 PM

Save your own bash history permanently?
 
Lets say I wanted to save my bash history permanently. I.e., so I could look in a log somewhere and find some command I used 6 months ago, like the one I used to get my printer drivers installed.

This only would be the history for my own user (not all users).

wje_lq 10-07-2010 06:07 PM

Try putting something like this in your ~/.bashrc file:
Code:

date >> ~/bash_historie
cat ~/.bash_history >> ~/bash_historie

You'll probably get commands which appear in that file plenty of times, but this quick and dirty quick-n-dirtiness will do the job.


All times are GMT -5. The time now is 05:48 PM.