2014-10-03 76 views
0

因此,我在我的服務器計算機上運行摩西機器翻譯系統。我從ssh訪問終端,我遇到了一個有趣的問題。make nohup忽略「>」和「<」

我跑用途>指定輸出文件,它看起來像這樣的紙條:

~/mosesdecoder/bin/moses -f /home/tin/working/filtered/moses.ini -i /home/tin/working/filtered/input.29242 > final 

現在,因爲這將需要一些時間翻譯完成(約10小時)我想它與nohup運行,但是當我這樣做,即使我把&在最後我最終與文件命名爲「最終」充滿stdout的東西。

有關如何避免它的任何想法?

+0

'LN -s的/ dev/null的final'運行過嗎?這將丟棄輸出;我不確定這是你的追求。假設重定向位於使用nohup運行的腳本中 - nohup甚至不處理它們,它只是保護運行腳本的shell不會被SIGHUP終止。 – greggo 2014-10-03 21:22:07

回答

0

如果您在實際的腳本文件中運行命令,則可以在腳本中刪除>,然後運行nohup ./sciptname.sh

這將打印腳本的輸出到終端,但nohup會將其重定向到當前目錄中的「nohup.out」。

來源:

按照nohup的聯機幫助我讀,If the standard output is a terminal, the standard output is appended to the file nohup.out in the current directory.

給它一個鏡頭:)

相關問題