Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 667 Bytes

File metadata and controls

33 lines (27 loc) · 667 Bytes

pyro

Small utility to rotate files.Example of a crontab

Install

sudo python setup.py install

Setup crontab to rotate periodically

This will rotate every night at midnight.

$ crontab -e
0 0 * * * /usr/local/bin/pyro

Modify Config

$ cat /etc/pyrorc 
# file - file name to rollover
# backupCount - at most backupCount files will be kept (0 means no limit)

[bash]
file = $HOME/bash_history/.bash_history
backupCount = 0

Add new .bash_history location to /etc/profile

echo "# Move .bash_history location" | sudo tee -a /etc/profile
echo "export HISTFILE=$HOME/bash_history/.bash_history" | sudo tee -a /etc/profile