Shell脚本关闭Nginx进程


[root@centos00 ~]# ps -ef | grep nginx
root 6682 1 0 18:30 ? 00:00:00 nginx: master process sbin/nginx
nobody 6801 6682 0 18:46 ? 00:00:00 nginx: worker process
root 7104 4224 0 20:17 pts/4 00:00:00 grep nginx
[root@centos00 ~]# ps -ef | grep nginx | grep -v grep
root 6682 1 0 18:30 ? 00:00:00 nginx: master process sbin/nginx
nobody 6801 6682 0 18:46 ? 00:00:00 nginx: worker process
[root@centos00 ~]# ps -ef | grep nginx | grep -v grep | awk '{print $2}'
6682
6801
[root@centos00 ~]# ps -ef | grep nginx | grep -v grep | awk '{print $2}' | xargs kill -9

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM