I logged in a server remotely via ssh and I wanted to keep my program running even after turning off my computer (i.e., exiting from the shell prompt that my program is running on).
(ignoring input and redirecting stderr to std out)
For example: I want to continue running my java process:
- To keep updated about the output file and display it:
tail -f output.txt
Note:
- if you want to kill this process, use: kill -9 $pid
- Thanks, BM :-)
nohup [command] > [file_output] &
(ignoring input and redirecting stderr to std out)
For example: I want to continue running my java process:
nohup java -jar cluster.jar > output.txt &
- To keep updated about the output file and display it:
tail -f output.txt
Note:
- if you want to kill this process, use: kill -9 $pid
- Thanks, BM :-)
Comments
Post a Comment