茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1675080 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
Dell_M4500_00004.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

小企鵝開談 : [分享]如何在不知道PID的狀況下砍掉該PROCESS

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[分享]如何在不知道PID的狀況下砍掉該PROCESS
可以使用 killall 這個指令
ex.
$>killall --help 
usage: killall [ -egiqvw ] [ -signal ] name ...
       killall -l
       killall -V

    -e      require exact match for very long names;
            skip if the command line is unavailable
    -g      kill process group instead of process
    -i      ask for confirmation before killing
    -l      list all known signal names
    -q      quiet; don't print complaints
    -signal send signal instead of SIGTERM
    -v      report if the signal was successfully sent
    -V      display version information
    -w      wait for processes to die

-e,--exact require exact match for very long names
要求程序名稱完全吻合
-g,--process-group kill process group instead of process
刪除全組程序
-i,--interactive ask for confirmation before killing
在刪除前要求確認
-l,--list list all known signal names
列出所以已知的系統訊號
-q,--quiet don't print complaints
不列印訊息
-s,--signal send signal instead of SIGTERM
改用其他系統訊號代替 SIGTERM (終止程式)
-v,--verbose report if the signal was successfully sent
列印執行結果
-V,--version display version information
版本
-w,--wait wait for processes to die
等待程序終止

假設我想要直接砍掉radiusd這支程式, 只要在killall後面加上程式名稱就可以了.
$>killall -v radiusd 
Killed radiusd(21910) with signal 15 
前一個主題 | 下一個主題 | 頁首 | | |



Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|