[SunHELP] E3500 / partition is getting full v2

Tim Bell sunhelp at sunhelp.org
Fri Sep 28 11:56:51 CDT 2001


You could try this script I wrote (or stole... can't remember) about six
years ago - it gives you a list of files modified within the past two
hours. Hours can be changed by modifying two lines:
if [ $NHOUR -lt 2 ]
     let BHOUR=NHOUR-2
Change the 2 to the time frame you wish to search. 

For future ref - you can also use this script to search for files older
than n hours by changing:
find / -newer /timestamp -ls
to
find / ! -newer /timestamp -ls

timmy!
(I need a freaking job)
tim at menus.com
----------------------------------------------------------
#!/usr/bin/ksh
#
# Find files newer than 2 hours.
# Sgt. Bell - 13th MEU, U.S.M.C.
#
typeset -Z2 BHOUR=0
typeset -Z2 NHOUR=0
CDAY=`date "+%m%d"`
NHOUR=`date "+%H"`
NMIN=`date "+%M"`
if [ $NHOUR -lt 2 ]
then
     let BHOUR=24-NHOUR
     let CDAY=CDAY-1
else
     let BHOUR=NHOUR-2
fi
BTIME=`echo $CDAY$BHOUR$NMIN`
touch -t $BTIME /timestamp
find / -newer /timestamp -ls
----------------------------------------------------------




---------------------------------------------------------------
NetZero Platinum
Only $9.95 per month!
Sign up in September to win one of 30 Hawaiian Vacations for 2!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97



More information about the SunHELP mailing list