shell kill

ps -ef | grep nagios.cfg | grep -v grep | awk '{print $2}' | xargs kill -s 9

netstat -tpln | grep 8009 | awk '{print $7}' | awk -F '[/]' '{print $1}' | xargs kill -9 && /usr/local/tomcat6/bin/startup.sh && tail -f /usr/local/tomcat6/logs/catalina.out

\cp -frv 递归拷贝

ls|grep sample|awk -F"." '{print $1}'|xargs -i{} mv {}.cfg-sample {}.cfg

猜你喜欢

转载自leovlys.iteye.com/blog/2024182