1.删除30分钟前的.sql结尾的文件
find /xx/xx -nmin +30 -type f -name *.sql | xargs rm -f
2.linux下查询tomcat进程使用情况
ps -ef | grep tomcat
3.杀掉某个目录下的所有tomcat进程
ps aufx|grep tomcat|grep 509|awk '{print $2}'|xargs kill -9
4.查看某个目录下修改时间在一天之内的文件
find /xxx -mtime -1
5.释放cache块的内存
echo 1 > /proc/sys/vm/drop_caches
6.查找文本内容替换指定文本
sed -i "s/{function n(i,n,o)/1/g" `grep -rl "{function n(i,n,o)" ./`
7.查看最近登录记录
who /var/log/wtmp
8.查看占用端口的程序
lsof -i | grep port