how 'bout:
assume current dir has the old files
find . -mtime +30 -exec rm {} \;
and cron that to run each night. Should delete for each file not modified for a month
Code:
futur6/usr/users/wayne/junk> ls -lart
total 20
-rw-r--r-- 1 wayne dba 393 Nov 10 08:59 hung-ftp.txt
-rw-r--r-- 1 wayne dba 705 Nov 17 10:25 vmstat.txt
-rw-r--r-- 1 wayne dba 1867 Nov 17 10:57 vmstat-p.txt
drwxr-xr-x 2 wayne dba 8192 Nov 20 09:32 .
drwx------ 7 wayne dba 8192 Feb 3 08:00 ..
futur6:/usr/users/wayne/junk> find . -mtime +30 -exec rm {} \;
rm: cannot remove '.' or '..'
futur6/usr/users/wayne/junk> ls
futur6/usr/users/wayne/junk>