This is quite simple and you don't need cron. In 3 easy steps...
First, add shopt -s histappend to your bashrc to get history appended on bash session exit.
Next, make sure you have export HISTCONTROL=erasedups there to have no duplicate entries.
Finally use a large number in export HISTSIZE=
This will give you a large .bash_history file that you can search and back-up as needed.

0 comments:
Post a Comment