#!/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
转载于:https://blog.51cto.com/swq499809608/1298943