The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-02-2007
fpmurphy fpmurphy is offline
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;
Reply With Quote