[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20050421: LDM scour issue and computer lock-up
- Subject: 20050421: LDM scour issue and computer lock-up
- Date: Thu, 21 Apr 2005 09:37:38 -0600
Gabe,
>Date: Thu, 21 Apr 2005 11:29:20 -0400 (EDT)
>From: Gabe Langbauer <address@hidden>
>Organization: Ohio State University
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20050421: LDM scour issue and computer lock-up
>Keywords: 200504191903.j3JJ3u4n010376
The above message contained the following:
> Couldn't discover meaning of mtime argument
Good!
Now try the attached script.
Regards,
Steve Emmerson
#PATH=/bin:/usr/local/
PATH=/bin:/home/ldm/bin
LOGGER=echo
TZ=UTC0 export TZ
dayOffsetName=scour_$$
trap 'rm -f /tmp/$dayOffsetName' EXIT
if touch /tmp/$dayOffsetName; then
sleep 2
if find /tmp \! -name tmp -prune -mtime 0 -name $dayOffsetName \
|
grep /tmp/$dayOffsetName >/dev/null 2>&1; then
DAY_OFFSET=1
elif find /tmp \! -name tmp -prune -mtime 1 -name $dayOffsetName \
|
grep /tmp/$dayOffsetName >/dev/null 2>&1; then
DAY_OFFSET=0
else
$LOGGER "Couldn't discover meaning of '-mtime' argument of find(1)"
exit 1
fi
rm /tmp/$dayOffsetName
else
$LOGGER "Couldn't create '-mtime' discovery-file /tmp/$dayOffsetName"
exit 1
fi