1. lnoi.sh: Lists the number of connections per IP under the current system:
# Cat Lnoi.sh
#!/bin/bash# use for list connect numbers and IP address.netstat-n | grep ' ^tcp ' | Grep-v ' 127.0.0.1 ' | awk ' {print $} ' | Cut-d:-f1 | Sort | uniq-c | Sort-rn | awk ' begin{printf '%-10s%s\n "," Connum "," IP "}{printf"%-11s%s\n ", $1,$2} '
2. lu.sh: List uid>=500 and!=65534 's account:
# Cat Lu.sh
#!/bin/bash# use for list conut for UID > + not eq 65534.awk-f: ' begin{printf '%-15s%-7s%s\n%-s\n ', ' Username ', ' UID "," GID "," ========================== "} $ >= && $! = 65534 {printf"%-15s%-7s%s\n ", $1,$3,$4} end{print F "%s\n%s\n", "==========================", "List Over"} '/etc/passwd
This article is from the "Silver Kay Blog" blog, make sure to keep this source http://yinkai.blog.51cto.com/3813923/1615523
A practical Little book under Bash (not updated regularly)