
我跑
nohup bash -c "while [ true ]; do echo test; done"
來自PuTTy
SSH 用戶端,但此進程不再在背景執行,而是nohup
保持為 shell 中的前台進程。
軟體版本:nohup (GNU coreutils) 8.5
答案1
nohup bash -c "while [ true ]; do echo test; done" &
Nohup 可讓您免受掛斷訊號的影響。但它不會自動將進程設定為後台。
命令末尾的 & 使其在背景運行。