1.在文件夹里查找含有某些字符串

find / -type f -name "*.php" |xargs grep "mail"

2.查看端口占用情况

netstat -an|grep 8080

nmap localhost|grep 8080

3.查看端口是否开启

telnet ip port