看板 Windows 關於我們 聯絡資訊
作業系統:Win7 問題內容: 例如 linux 可以 ps -ef | grep "MyGrep" 找出想要的pid 在windows 可以這樣做嗎? 小弟的目的是 tasklist 找出taskmgr.exe的PID 並kill它 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.171.200.51 ※ 文章網址: https://www.ptt.cc/bbs/Windows/M.1513770163.A.741.html
giacch: TASKKILL /F /IM TASKMGR.EXE 12/20 21:35
pendoth: tasklist指令本身就有過濾參數/fi可以使用 12/23 15:53
pendoth: tasklist /fi "imagename eq taskmgr.exe" 12/23 15:54
pendoth: 或要像linux的grep,windows底下有findstr 12/23 15:55
pendoth: tasklist | finstr "taskmgr" 12/23 15:55
pendoth: ^d 12/23 15:56
asdg62558: linux 使用 grep 應該不用加雙引號吧 就有關鍵字的功 12/30 19:33
asdg62558: 能!! 12/30 19:33