**rm all user exculde root(include user mail and directory)** #!/bin/bash for i in $(cut -d : -f 1 /etc/passwd | grep -v root) do userdel -f -r $i done 如果有可能会持续更新
malice bash collection
原文:http://blog.51cto.com/10973437/2064085