禁IP
iptables -A INPUT -s IP地址 -j REJECT
iptables -A INPUT -s IP地址/24 -j REJECT
route add -net IP地址 netmask 255.255.255.0 reject
调试命令
strace -p pid
跟踪指定的进程pid
gdb -p pid
批量查找文件并删除
find . -name test.php -exec rm {} \;
find . -name test.php | xargs rm -rf
更改某一目录下所有目录的权限, 不包括文件, aaa 是目录名
find aaa -type d -exec chmod 755 {} \;
替换文件内容
sed -i 's/b/strong/g' index.html
此命令搜索 index.html 文件中的 b 并将其替换为 strong
