You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
381 B
21 lines
381 B
#!/bin/bash
|
|
|
|
# 判断参数个数是否小于 1
|
|
if [ "$#" -lt 1 ]; then
|
|
echo "usage: ${0} logFileName"
|
|
echo " ${0} 20231227.log"
|
|
echo " ${0} 20231230.log"
|
|
echo " ..."
|
|
exit 1
|
|
fi
|
|
|
|
while true; do
|
|
echo "clean file ..."
|
|
ls -lrth
|
|
: > ./$1
|
|
ls -lrth
|
|
|
|
echo "clean ok, sleep ..."
|
|
|
|
sleep 50
|
|
done
|