编写个shell脚本将当前目录下大于10K的文件转移到/tmp目录下

[root@localhost ~]# vi 10K.shbash

#!/bin/bash
#ext-1
#Using for move currently directory to /tmp
for Filename in $(ls -l |awk '$5 > 10240 {print $9}')
do
mv $Filename /tmp
done
ls -la /tmp
echo "Done!"ide

相关文章
相关标签/搜索