{"id":5036,"date":"2019-09-27T19:14:40","date_gmt":"2019-09-27T11:14:40","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=5036"},"modified":"2019-10-12T18:13:24","modified_gmt":"2019-10-12T10:13:24","slug":"pgrep","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/pgrep","title":{"rendered":"pgrep\u547d\u4ee4 – \u7528\u4e8e\u68c0\u7d22\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b"},"content":{"rendered":"\n
pgrep\u547d\u4ee4\u5c31\u662f\u68c0\u7d22\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u663e\u793a\u5339\u914d\u51c6\u5219\u662f\u8fdb\u7a0b\u7684PID\uff0c\u53ef\u8ddf\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u8fdb\u7a0b\u6216\u547d\u4ee4\u884c\u3002<\/p>\n\n\n\n
\u9009\u62e9\u8fdb\u7a0b\u62e5\u6709\u8005\u65f6\uff0c\u9ed8\u8ba4\u5339\u914d\u89c4\u5219\u662f\u903b\u8f91\u4e0e\u7684\u5173\u7cfb\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>pgrep [\u53c2\u6570] [\u6a21\u5f0f]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u67e5\u8be2\u7528\u6237root\u542f\u52a8\u7684bash\u8fdb\u7a0b\u7684PID\uff1a<\/p>\n\n\n\n pgrep\u547d\u4ee4\u5c31\u662f\u68c0\u7d22\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u663e\u793a\u5339\u914d\u51c6\u5219\u662f\u8fdb\u7a0b\u7684PID\uff0c\u53ef\u8ddf\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u8fdb\u7a0b\u6216\u547d\u4ee4\u884c\u3002 \u9009\u62e9\u8fdb\u7a0b […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5036"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=5036"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5036\/revisions"}],"predecessor-version":[{"id":5182,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/5036\/revisions\/5182"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=5036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=5036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=5036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-d<\/td> \u8bbe\u7f6e\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u5206\u9694\u8f93\u51fa\u7684\u6bcf\u4e2a\u8fdb\u7a0bID<\/td><\/tr> -f<\/td> \u6a21\u5f0f\u53c2\u6570\u4ec5\u7528\u4e8e\u5339\u914d\u8fdb\u7a0b\u540d<\/td><\/tr> -I<\/td> \u5217\u51fa\u8fdb\u7a0b\u540d\u53ca\u8fdb\u7a0bID<\/td><\/tr> -P<\/td> \u4ec5\u9009\u62e9\u5339\u914d\u6307\u5b9a\u7236\u8fdb\u7a0bID\u7684\u8fdb\u7a0b<\/td><\/tr> -u<\/td> \u9009\u62e9\u4ec5\u5339\u914d\u6307\u5b9a\u6709\u6548\u7528\u6237ID\u8fdb\u7a0b<\/td><\/tr> -U<\/td> \u9009\u62e9\u4ec5\u5339\u914d\u6307\u5b9a\u771f\u5b9e\u7528\u6237ID\u7684\u8fdb\u7a0b<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# pgrep -u root bash<\/pre>\n","protected":false},"excerpt":{"rendered":"