The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
conditional deletion of log files
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
conditional deletion of log files
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
10-02-2007
fpmurphy
Moderator
Join Date: Dec 2003
Location: /dev/florida
Posts: 951
You can use the -s option of the test(1) utility to determine
if the log file size is greater than zero i.e.
if test -s $LOGFILE
then
save $LOGFILE
else
rm -f $LOGFILE
if;
fpmurphy
View Public Profile
Find all posts by fpmurphy