linux 殺進程

system("ps |grep boa|grep -v grep|cut -c 1-6|xargs kill -9"); grep -v    表示 Select non-matching lines, 由於grep的時候把它自己的進程也抓出來了。 cut -c 1-6 表示 只保留第一到第六個字符,這裏把進程號cut來了。 xargs - build and execute command l
相關文章
相關標籤/搜索