#!/usr/bin/env bash
for i in `ls /root`:
do
if [ -f $i ];then
a=`ls -l $i|awk '{print $5}'`
echo $a
if [ $a -ge 1024 ];then
if [ ! -d '/root/new' ];then
mkdir -p '/root/new'
fi
echo $i
mv $i '/root/new'
fi
fi
done
本文转自 swq499809608 51CTO博客,原文链接:http://blog.51cto.com/swq499809608/1298943