問題:
I'm working on a Linux machine through SSH (Putty).我正在通過 SSH (Putty) 在 Linux 機器上工作。 I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.我需要讓一個進程在夜間運行,所以我想我可以通過在後臺啓動進程(命令末尾有一個&符號)並將stdout重定向到一個文件來做到這一點。
To my surprise, that doesn't work.令我驚訝的是,這行不通。 As soon as I close the Putty window, the process is stopped.一旦我關閉 Putty 窗口,該過程就會停止。
How can I prevent that from happening??我怎樣才能防止這種情況發生??
解決方案:
參考一: https://en.stackoom.com/question/1C91參考二: https://stackoom.com/question/1C91