LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (http://www.linuxquestions.org/questions/general-10/)
-   -   tcsh: can you save the history from multiple shells to one history file? (http://www.linuxquestions.org/questions/general-10/tcsh-can-you-save-the-history-from-multiple-shells-to-one-history-file-711440/)

BrianK 03-13-2009 05:13 PM

tcsh: can you save the history from multiple shells to one history file?
 
I often have several terminal windows open at any one time. My history file seems to only hold the history from the last shell I close at the end of the day.

I know I can have each shell write to a different file, but is there a way to have each shell write to the same file so that when I come in the next day & hit the up arrow in a terminal, it will go through everything I did the day before?


I figured something out late last night & didn't bother writing it down. Now what I did is no longer in my history because I closed that terminal down before another one. Trying to avoid that happening again.

rhel5 04-22-2009 08:19 PM

I am also wondering the same thing.

Instead, I would like to use it as a log file to track what an user has been doing on my box.

Thanks!

jisjis 04-23-2009 06:19 AM

Quote:

Originally Posted by BrianK (Post 3474726)
I often have several terminal windows open at any one time. My history file seems to only hold the history from the last shell I close at the end of the day.

I know I can have each shell write to a different file, but is there a way to have each shell write to the same file so that when I come in the next day & hit the up arrow in a terminal, it will go through everything I did the day before?


I figured something out late last night & didn't bother writing it down. Now what I did is no longer in my history because I closed that terminal down before another one. Trying to avoid that happening again.


Write a small script to concat the content of your bash history file every couple of mins.

Linux


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