Wednesday, November 30, 2005

Script to remove old files

I finally got around to writing a script to remove old files from dcc that were filling up my disk.  The script was pretty simple.

DATE=`date +"%y%m%d"`
if [ -d $LOGDIR ]; then
find $LOGDIR -type f -name 'msg.*' -mtime $TIMELIMIT -exec rm {} \;

Technorati Tags:

No comments:

Post a Comment

Mastering Home Network Security: A Step-by-Step Guide to Fortify Your DNS with Pi-Hole and Raspberry Pi Across Multiple VLANs

Recently, I delved into the realm of setting up secure DNS for our home network, aiming to encrypt DNS requests en route to the name server....