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