運行「頂」命令我有問題,使用的nohup來在後臺運行top命令。首先,我本地運行,爲使用「nohup的」在後臺
nohup top &
它抱怨在nohup.out
文本top: failed to get tty
。我的最終目標是爲運行遠程機器上的頂部,像
nohup ssh -t [email protected] top &
目前,上述命令也失敗
Pseudo-terminal will not be allocated because stdin is not a terminal.^M
TERM environment variable not set
任何想法?
PS:我從machineA
運行此命令ping machineB
。 machineA
永遠活着,但不併不總是登錄。
您可以使用屏幕。它會打開一個終端,然後運行頂部,然後您可以分離(Ctrl + a然後d)退出,但讓屏幕在後臺運行。如果你不介意我問,你想達到什麼目的? –
我很困惑_why_你想這樣做。 – tacaswell
@JanitoVaqueiroFerreiraFilho我必須使用的nohup這是在我的Linux發行版內置,和我沒有root權限安裝''screen'' – Richard