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.



#!/bin/sh
TIMELIMIT="+14"
LOGDIR=/var/dcc/log
DATE=`date +"%y%m%d"`
if [ -d $LOGDIR ]; then
find $LOGDIR -type f -name 'msg.*' -mtime $TIMELIMIT -exec rm {} \;
fi

Technorati Tags:

No comments:

Post a Comment

Mastering Matter: Seamless Smart Home Integration with Network Segmentation

I’ve been intrigued by the idea of integrating devices with Matter for some time. My smart home setup includes a pair of SwitchBot Hubs, som...