#!/bin/bash
FILE=/usr/local/mysql
FILESIZE=`du -s $FILE| awk ‘{print $1}‘`|cut -f 1 -d ‘M‘
if [ $FILESIZE -gt 20 ]; then
echo "the file size is more than the primary file"
else
echo "the file size is less than the primary file"
fi
本文出自 “常用文档” 博客,请务必保留此出处http://yujianglei.blog.51cto.com/7215578/1561569
原文地址:http://yujianglei.blog.51cto.com/7215578/1561569