Append bash history to another file during logout
Hi friends ,
I am using Redhat Linux 5.6 . I want to delete all my 'history' command information during logout , but before deleting it copies to a new file . Also , each time of logout , it appends the new history command of that particular new file . Is anybody help me to do this ? |
Code:
man history Code:
cat ~/.bash_history >> yourfile |
Thx jmgibson ,
But I want to append the output during logout time . Also I want to add date i.e., ' HISTTIMEFORMAT' with the .bash_history output . |
there is a ~/.bash_logout file, see man bash about its usage. Probably that's what you need.
|
Thx all for help me .
|
All times are GMT -5. The time now is 02:26 PM. |