zoukankan      html  css  js  c++  java
  • linux ps sample

    ps -ef|grep "myswooleserver.php"| grep -v "grep" | wc -l
    4
    cpc@cpc-Aspire-6935:~/Downloads$ ps -ef|grep "myswooleserver.php"| grep -v "grep" 
    cpc      16849 16472  0 15:06 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      16850 16849  0 15:06 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      16853 16850  0 15:06 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      16854 16850  0 15:06 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc@cpc-Aspire-6935:~/Downloads$ ./myswoolelauncher.sh
    4
    cpc@cpc-Aspire-6935:~/Downloads$ ./myswoolelauncher.sh
    0
    cpc@cpc-Aspire-6935:~/Downloads$ ps -fe|grep "myswooleserver.php"| grep -v "grep" 
    cpc      17113 16472  0 15:14 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      17114 17113  0 15:14 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      17117 17114  0 15:14 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc      17118 17114  0 15:14 pts/3    00:00:00 php /home/cpc/Downloads/myswooleserver.php
    cpc@cpc-Aspire-6935:~/Downloads$ ps -eaf |grep "myswooleserver.php" | grep -v "grep"| awk '{print $2}'
    17113
    17114
    17117
    17118
    cpc@cpc-Aspire-6935:~/Downloads$ ps -eaf |grep "myswooleserver.php" | grep -v "grep"| awk '{print $2}'|xargs
    17113 17114 17117 17118

    some of  them

  • 相关阅读:
    组合数学练习
    floyd算法新理解
    图论练习
    GDOI2021 day2总结
    P3190 [HNOI2007]神奇游乐园
    P1932 A+B A-B A*B A/B A%B Problem
    P2289 [HNOI2004]邮递员
    P5056 【模板】插头dp
    P4323 [JSOI2016]独特的树叶
    CF1153D Serval and Rooted Tree
  • 原文地址:https://www.cnblogs.com/saintdingspage/p/11830370.html
Copyright © 2011-2022 走看看