home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 3.3J
/
os33j.iso
/
private
/
adm
/
daily
next >
Wrap
Text File
|
1992-12-22
|
697b
|
32 lines
#
# /usr/adm/daily
#
# This /bin/sh script is run once a day by cron. Put any housekeeping
# commands in here, like pruning of log files
#
# Trim the messages logfile
cp -p /usr/adm/messages /usr/adm/messages.old
/usr/ucb/tail -200 /usr/adm/messages.old > /usr/adm/messages
# Trim the /usr/spool/mqueue logfiles
cd /usr/spool/mqueue
for i in syslog
do
if [ -r $i ]
then
cp -p $i $i.old
/usr/ucb/tail -200 $i.old > $i
fi
done
# Remove old preserve files
find /private/preserve -mtime +7 -a -exec rm -f {} \;
# Clean out old .nfs files - but not when off the network.
if [ `/bin/hostname` != localhost ]; then
find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
fi