标签:style color sp for strong on 文件 bs as
2、 将/usr/local/test目录下大于100k的文件转移到/tmp目录下:
#!/bin/bash
for FILE in `ls /usr/local/test`
do
if [ -f $FILE ] ; then
if [ `ls -l $FILE | awk `{print $5}` -gt 100000 ] ; then
mv $FILE /tmp/
fi
fi
done
~~~~~~~~
#!/bin/bash
for FileName in `ls -l /usr/local/test | awk ‘$5>102400‘ {print $9}`
do
mv $FileName /tmp/
done
ls -al /tmp/
echo "done!"
标签:style color sp for strong on 文件 bs as
原文地址:http://www.cnblogs.com/hanxing/p/4155076.html