Instead of making boo1, boo2 etc. I'd suggest you to create file names with boo_<date> ; eg. today's file would be boo_20110119. It would be easier to identify also.
Try this:
0 0 * * 0,3 cp .bash_history boo_$(date +%Y%m%d)
But if you specifically want 1, 2 etc. you can write a small script to get the latest boo* file, then cut the string after '' , add 1 to that cut string as it would be a number, and create file with that name...
This line will not work for the following reasons:
A percentage sign must be escaped in a crontab because "%" has special meaning in a crontab.
The filenames need to be full hierarchial names in this context.
---------- Post updated at 16:25 ---------- Previous update was at 16:18 ----------
What are the settings of all the HIST* environment variables in your .bashrc file? If they are not correct you will not retain all your history.
Imho the best way to save history is to change the value of $HISTFILE to make the filename unique (i.e. include date, time and terminal id).
To reiterate.
Imho the best way to save history is to change the value of $HISTFILE to make the filename unique (i.e. include date, time and terminal id).
If your intent is to record all commands entered by you from the shell prompt, this is a poor approach to take. With a HISTSIZE of 9000, I seen to recall the bash (and other shells) slow down significantly as the actual history count increases.
Methyl's approach is better. An even better approach is to send your command history to a logging server as the korn shell can do. There is a patch out there for bash. Just do a web search for it.