shell判断文件大小

#判断大小
SIZE=8
FILE="test.sh"
size=0
until [ $size -eq $SIZE ]
do
    size=`ls -l "${FILE}" | awk '{print $5}'`
    echo "file $FILE size is $size, expected value is $SIZE"
    sleep 1
done
发布了26 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/luffy_1993/article/details/90030340