ref: 56c60d457432a050c48fbb96a4e3632f37deb7e4 pushbroom/README.md -rw-r--r-- 1.2 KiB
56c60d45Greg Anders Parameterize install script: options can now be specified at installation instead of modifying janitor.sh 5 years ago


Bash script to automate deleting old files in a specified directory


git clone git@github.com:gpanders/Janitor.git
cd Janitor

The install script creates a symlink in your home directory to janitor.sh and appends an entry to the current user's crontab (use crontab -l to view your active cron jobs)


Open the janitor.sh file to change options

Option Description
TARGET_DIR Define which folder to clean out
DAYS_TO_KEEP How long should a file be able to live in the folder?
TRASH_DIR Where to move deleted files. Delete this if you want to permanently delete files instead of moving them to Trash
LOG_DIR Location to store log files, relative to the Janitor directory