找出/root目录下大于15k的文件shell脚本


bash

for i in `ls -l /root/ | grep -v ^d |grep -v total | awk '{print $NF}'`
do

  file=$(du -k /root/$i | awk '{if($1>15) print $2}')
  echo $file | grep -v '^$'

done