marden_pimenta
(usa Fedora)
Enviado em 11/07/2008 - 14:47h
#!/bin/bash
du -a /* |sort -nr |head -n100 | awk '{print $1";" $2" "$3" "$4" "$5" "$6" "$7" "$8" "$9 }' > tmp.txt
more tmp.txt |awk '{print $1}'>tmp1.txt
for var in `cat tmp1.txt`
do
LINE=$(grep $var tmp.txt)
arq=$(echo $LINE |awk -F ";" '{print $2}')
tam=$(echo $LINE |awk -F ";" '{print $1}')
[ -d "$arq" ] ||echo -e "O arquivo $arq tem $tam""K " >> arq.txt
done
head arq.txt
rm tmp.txt tmp1.txt arq.txt