FAQ Database Discussion Community


How can I see the output console after running a nohup command?

linux,terminal,nohup
I have a code running on a Linux server. Since it takes hours to run, I have to use nohup to make sure my code is still running in case I loose my connection to the server. Again since I have to wait hours to see the results, I defined...

QNAP NAS nohup: no such file or directory

java,nohup,nas
I try to run a jar file from shell on my qnap nas and tried to use nohup: nohup java extender.jar & But i get an error nohup: no such file or directory if i run java extender.jar it works. i tried to find nohup find -name nohup but the...

Telling nohup to write output in real-time

bash,output,real-time,nohup
When using nohup the output of a script is buffered and only gets dumped to the log file (nohup.out) after the script has finished executing. It would be really useful to see the script output in something close to real-time, to know how it is progressing. Is there a way...

Unexpected nohup behaviour

unix,posix,nohup
I have an executable file test, it contains a="$RANDOM" echo "$a">>out Now, if I simply ./test then out contains a random number. But if I nohup ./test & then out is empty. Why?...

Pause bash script till a nohup is finished

bash,unix,nohup
I have the following script to keep track of pid for nohup - #!/bin/bash random=$RANDOM file=nohup_$random echo "PID and output will be stored in nohup_$random" echo nohup "[email protected]" &> $file & nohup "[email protected]" &> $file & curpid=$! echo "PID is "$curpid pidfile=nohup_${random}_$curpid echo "-- PID for this process is "$curpid...

PHP exec() nohup with redirect

php,exec,stdout,stderr,nohup
I am trying to execute a command with exec() and redirecting stdout and stderr to a file. exec("nohup python main.py -i 1 > /var/scripts/logs/1_out.log 2>&1 &"); It will create the file but it wont print anything to it. If I run the command in a terminal everything write without a...

node.js winston logger no colors with nohup

node.js,logging,nohup,winston
We are using winston logger in our project with the following transport settings: file: { filename: __base + '/log/server.log', colorize : true, timestamp : true, json : false, prettyPrint : true } If the application is started with nohup, log file is not colorized. It works only without nohup. nohup...

Get the time when nohup R program finishes

linux,shell,terminal,nohup
I want to get the time when program finish. But it always show the same time. Here is my shell script. It always show that START TIME is same as END TIME. How do I fix that? START=$(date +"%r") nohup Rscript program_1.R >program_1.Rout & wait & echo START TIME =...

series of commands using nohup [duplicate]

shell,unix,nohup
This question already has an answer here: Why can't I use Unix Nohup with Bash For-loop? 4 answers I have a series of commands that I want to use nohup with. Each command can take a day or two, and sometimes I get disconnected from the terminal. What is...