start to STAR

2012年7月22日 星期日

Ubuntu - 列出所有相關process, 排除字元, 捷取欄位, kill process

ps aux | grep <截取的字元> | grep -v <排除的字元> | awk '{print $2}' | xargs kill
awk '{print $2}'  → 印出第二個欄位  
xargs kill → 殺掉所有找到的process 
於 晚上10:50
標籤: Ubuntu
較新的文章 較舊的文章 首頁

搜尋此網誌

標籤

  • Bash Script
  • Git
  • Python
  • Sublime
  • Ubuntu
  • Windows

網誌存檔

  • ►  2021 (2)
    • ►  2月 (1)
    • ►  1月 (1)
  • ►  2020 (3)
    • ►  5月 (1)
    • ►  4月 (2)
  • ►  2019 (1)
    • ►  9月 (1)
  • ►  2017 (1)
    • ►  11月 (1)
  • ►  2016 (2)
    • ►  12月 (1)
    • ►  6月 (1)
  • ▼  2012 (11)
    • ►  8月 (1)
    • ▼  7月 (10)
      • Bash Script - default value
      • Bash Script - Random select element from array
      • Bash Script - check argument in array
      • Bash Script - 陣列及for迴圈範例
      • Ubuntu - 列出所有相關process, 排除字元, 捷取欄位, kill process
      • Ubuntu - MD5 generate and check
      • Windows - Bat Script - for 迴圈 (由0印到10)
      • Ubuntu - Some Linux Command
      • Bash Script - Read file for bash
      • Bash Script - If...Else
頂尖企業主題. 技術提供:Blogger.