2006/05/22

砍掉mqueue中是垃圾信回寄的queue

用bash把df*的前100行內有SPAM的檔案抓出來:
---------------------
if [ -f z1.txt ]
then
rm z1.txt
fi
for i in `ls df*`
do head -100 $i | grep SPAM && echo $i |cut -c4-16|sort|uniq >> z1.txt
done
---------------------

砍掉這些檔:
---------------------
for i in `cat z1.txt`
do rm `ls ???$i`
done
--------------------

抓出有什麼字串的queue檔名:
--------------------
grep "$1" q* Q* |cut -c4-16|sort|uniq > z1.txt
--------------------

0 Comments:

Post a Comment

<< Home