# .bash_history rotate to /var/log/history (kTm security)
# chattr +a /var/log/history/ 

if [ ! -d /var/log/history/`id -un` ] && [ `id -un` != "root" ]; then
mkdir /var/log/history/`id -un`
fi

if [ `id -un` != "root" ]; then
export HISTFILE=/var/log/history/`id -un`/`date +%d-%b-%H:%M`
fi