#!/bin/sh | |
# | |
#¸Ã½Å±¾ÓÃÓÚÔÚlog³¬¹ýÏÞÖÆºóɾ³ýlogÎļþ | |
# | |
####»ñȡͨÓÃnv±äÁ¿#### | |
path_conf=`nv get path_conf` | |
test_log=`nv get telog_path` | |
if [ "$test_log" == "" ]; then | |
test_log=`nv get path_log`"te.log" | |
fi | |
####delete#### | |
max_size=`nv get comm_logsize` | |
file_size=`wc -c $test_log | awk '{print $1}'` | |
if [ $file_size -gt $max_size ]; then | |
rm -f $test_log | |
echo "The log has been deleted." >> $test_log | |
fi |