This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Paul's Time Sink

| Main | Albums |

« | »

Script to remove old files

Paul Westbrook | 30 November, 2005 19:07

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:

Add comment

Topic

Text

Your name

Your email address

Your personal page (if any)




Powered by LifeType
Design by Book of Styles