xf.li | 8611891 | 2025-03-19 20:07:27 -0700 | [diff] [blame^] | 1 | #!/bin/sh |
2 | |||||
3 | # | ||||
4 | #¸Ã½Å±¾ÓÃÓÚÔÚlog³¬¹ýÏÞÖÆºóɾ³ýlogÎļþ | ||||
5 | # | ||||
6 | |||||
7 | ####»ñȡͨÓÃnv±äÁ¿#### | ||||
8 | path_conf=`nv get path_conf` | ||||
9 | test_log=`nv get telog_path` | ||||
10 | if [ "$test_log" == "" ]; then | ||||
11 | test_log=`nv get path_log`"te.log" | ||||
12 | fi | ||||
13 | |||||
14 | ####delete#### | ||||
15 | max_size=`nv get comm_logsize` | ||||
16 | file_size=`wc -c $test_log | awk '{print $1}'` | ||||
17 | if [ $file_size -gt $max_size ]; then | ||||
18 | rm -f $test_log | ||||
19 | echo "The log has been deleted." >> $test_log | ||||
20 | fi |