find /home/wind -maxdepth 1 -type d | sed 1d | xargs -I'{}' du {}/www -sb | gawk '{ if ($1>20*1024*1024) {system("echo " $2 " more than " 20*1024*1024)}; }'
#!/bin/bash #此小脚本为方便需要大批量删除具有相通特征的用户(如xuanfei1 xuanfei2 xuanfei3) read -p "请输入你想要删除的用户并指定范围(如:xuanfei 1 100):" a b c let d=$c-$b+1 for((i=1;i<=$d;i++)) do userdel $a$b && echo "已经成功删除$a$b用户" #想彻底删除用户所有的资料可添加下条明令 #rm -rf /home/$a$b let b=b+1 done
find /home/wind -maxdepth 1 -type d | sed 1d | xargs -I'{}' du {}/www -sb | gawk '{ if ($1>20*1024*1024) {system("echo " $2 " more than " 20*1024*1024)}; }'