Questions tagged [nohup]

nohup is a POSIX command to ignore the HUP (hangup) signal.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

nohup not working on with my Node.js project on shared hosting server

I am facing the issue that the project won't run while I logged out from SSH terminal after I ran the project with nohup node app.js > foo.out 2> foo.err < /dev/null & and pm2 start app....
0
votes
0answers
18 views

How to run script with nohup through sshpass

I want to pass a local script generated on the fly and it will trigger another script on my remote machine to running some commands for a long period of time. this is the command I have tried: cat &...
0
votes
0answers
25 views

Nohup is not working as expected

On a fresh install of OpenMediaVault (debian based), I try to start and keep rsync in background when leaving my ssh session. I've always do that with success in previous versions.. But now with this ...
0
votes
1answer
32 views

Nohup with shell variables before command

It seems that nohup is unable to run commands that have environment variables before them. For example, nohup LD_PRELOAD=~/file.so ./run & says nohup: failed to run command 'LD_PRELOAD=/home/...
0
votes
0answers
34 views

is there a setting that can be set so that jobs will continue after logoff, so that nohup isn't necessary?

is it possible to alter some setting in CentOS so that nohup isn't necessary? i.e. so that my scripts won't be killed when I log off? I think that the automatic output of text to nohup.out is ...
0
votes
2answers
46 views

Get output redirection part of a running process

Sometimes I run jobs, I lose track of which output files I have redirected the output to. How can I get the full command I ran a job with, including the output redirection part? For example, when I ...
0
votes
1answer
23 views

If zip runs out of space, will it save a partial zip?

I have been running this command to zip each subdirectory into a zip file: nohup sh -c 'for i in */; do zip -r "${i%/}.zip" "$i"; done' & With that said, I ran out of space, and I am trying to ...
0
votes
2answers
42 views

How to compress multiple folders in the background, each into its own zip archive?

I found that a great way to zip folders into their own zip files is through this loop: for i in */; do zip -r "${i%/}.zip" "$i"; done But I wanted to do this all in the background (e.g., nohup &)...
0
votes
0answers
7 views

Nohup supports for 1 site in a Linux Server and not for other site on another Linux Server

I use nohup to live 2 sites from 2 different servers. 1 site never goes down & other site from another server goes down regularly. Everyday i have to execute command : " nohup node server.js &...
0
votes
3answers
43 views

Start command remotely and then close connection

I'm trying to start a trim command on a bunch of servers remotely since these are appliances and we lose support if you change anything like cron jobs locally. I'm trying to do this: ssh root@192....
0
votes
1answer
86 views

rsync (but also other commands) run with nohup gets sigterm

I'm connecting from my computer to a HP UX B.11.31 system and am running some very lengthy there commands using nohup so I can go to sleep and do something else for a few days while they complete. ...
0
votes
1answer
37 views

Is nohup supposed to kill my script process?

I got a script that I'm trying to run with nohup: nohup /home/user/script.sh& If I run ps -a I can still see the process but if I close the terminal and run ps -a again the process is not there. ...
1
vote
1answer
66 views

nohup exiting with error 125

nohup exits with Error 125 when trying to start a Python script in the background, yet when using wildcards, pointing to the very same file, nohup works. root@rpi_2:/home/pi/shortcuts# nohup -c ...
1
vote
2answers
221 views

Restart application after crash

I have some application (net core 2.1 app) which I run like this: nohup dotnet publish/TestApp.dll This application crashes sometimes, and I need to restart it when that happens. What do I need to ...
3
votes
2answers
79 views

Run script with user input and then disconnect job and run in background

So I have a bash script that first asks for a series of three variables from the user. I then want the script to run in the background disconnected from my session, so that when I cut the connection ...
0
votes
1answer
180 views

email notification upon completion or error of nohup background process

How would I send an email if a background process I run via nohup fails or is completed? I am running a lot of background processes via nohup in a for loop: for afolder in $dir/dothis* do nohup ...
3
votes
2answers
33 views

Is there a way to get the union of `ps a` and `ps x`?

I would like the union of the processes returned by ps a and the processes returned by ps x. When using Docker and nohup, it feels like one or the other of them works, but neither always shows the ...
1
vote
1answer
36 views

ssh: subscribe to nohup.out

Suppose I launch a long running task on a remote machine with nohup: nohup command & Is there a way for me to stream the contents of nohup.out to a terminal with ssh such that it is getting ...
0
votes
1answer
49 views

Run scripts at logout

Sometimes I ssh into a box, and run some script that makes a change to the system. I want to undo this change when my session ends, either explicitly (e.g., via exit from the logout shell) or ...
0
votes
1answer
58 views

umask doesn't work with nohup

It seems that umask and nohup don't work correctly together. I did this: $ umask 022 $ nohup java -jar blah.jar & [1] 12345 nohup: ignoring input and appending output to `nohup.out' $ ls -l ...
0
votes
1answer
86 views

How to avoid creating nohup.out file

nohup command &> /dev/null & This command still creates nohup.out file. Could you please help on how to avoid it?
1
vote
1answer
82 views

Nested nohup mishandle output

I have a bash script A (i.e. scripta.sh) which executes another bash script B (i.e. scriptb.sh), running other commands. A: # Cool logic scriptb.sh & B: # Cool logic nohup python3 app.py >&...
0
votes
1answer
137 views

How to prevent/keep tail from replacing \r by \n

When I play a video with mpv in the backgroud, I get this : $ tail -f nohup.out Playing: https://www.facebook.com/TBN/videos/1580372468665943/ (+) Video --vid=1 (*) (h264 1266x720 30.000fps) (+) ...
1
vote
1answer
67 views

Running a Command, that will not terminate upon closing terminal

I am trying to work with a remote device that I login to using SSH, the device uses MQTT for communication, and I want to be able to log that remotely without keeping a terminal open with the command ...
0
votes
1answer
120 views

WHy is my Nohup process dying?

What's wrong with this code? Suddenly the nohup process dies, without a trace. bin/sh sleep 5s cd /home/minecraft/OMC nohup java -jar -Xms3400M -Xmx3400M -jar paperclip.jar &
-1
votes
1answer
4k views

nohup: ignoring input and appending output to 'nohup.out'

I ran the following command nohup conda activate shuffle_pair_end_reads && python3 shuffle_pair_end_reads.py \ fastp-filtered-merged4racon/merge_R1.fq.gz \ fastp-filtered-merged4racon/...
0
votes
1answer
136 views

“nohup cat” — write the complete content to the log file rather to concatenate file

I used the below command nohup cat fastp-filtered/OZBenth*_R1.fastp.fq.gz > fastp-filtered-merged4racon/merge_R1.fq.gz > merge_R1.out.log 2>&1 & but unfortunately, the output went ...
1
vote
3answers
868 views

Issue with the exit code of a nohup command in unix

I have been trying to figure out on how to capture the exit status of the nohup command and then send a mail based on the status. Below is my code: if [[ "" != "$PID" ]]; then echo "killing $...
0
votes
0answers
233 views

pass function to nohup to keep command running

I have the following function set up which looks at a given directory and decompresses any files using qpress. It also records how long the process runs for. fc_decompress () { startTime="$(date +...
0
votes
2answers
970 views

Nohup: Redirect stderr to file and dismiss stdout

Per default, nohup writes stdout to nohup.out and dismisses stderr. I would like to have it the other way around: write stderr to a file and dismiss stdout.
0
votes
1answer
391 views

[1]+ Exit 125 nohup [closed]

I am running the following command: nohup ./run_hyper_param_tuning.sh> ../../logs/hyper_model_15_b_Jan.txt 2>&1 & echo $! >save_pid.txt It has been always working but suddenly it ...
1
vote
1answer
407 views

No nohup logs on remote server

I'm trying to start a proccess on remote server with ssh. I need to log stdout on target server (not the local one) Here is the script: sshpass -p mypwd ssh root@myserver.com nohup java -jar /tmp/...
1
vote
0answers
29 views

Script get in process multiple times

I have a script that starts, kills or restarts several java programs. However, when I execute it, it ends up running multiple multiple times in the background. This is my script: #!/bin/bash export ...
0
votes
0answers
25 views

Terminal Hangs when running bot

I have a bot installed on my Azure Linux VM running Ubuntu 18.04. I am running the command to start my bot, and it returns an error (see below). The console freezes as well apparently because it ...
0
votes
0answers
30 views

-bash error when trying to run bot [duplicate]

I have a bot installed on my Azure Linux VM running Ubuntu 18.04. I am running the command to start my bot, and it returns an error (see below). $ nohup python3 bot.py > nohup_bot.out -bash: ...
1
vote
0answers
140 views

Program start from interactive shell fails when shell script initiated by launcher

[This post has been edited from the original text to add the results of further investigation and get to the point more quickly -- Thanks @ctrl-alt-delor] Why does this script: #!/bin/bash read -p "...
1
vote
1answer
234 views

Does nohup apply only to a child process of a shell process, but not to a child process of a non-shell process?

nohup is an external program. How can it change the action of SIGHUP by a child process of a shell process to be "ignore"? (in terms of some arguments when the child process invokes fork() and/or ...
18
votes
2answers
2k views

Do `disown -h` and `nohup` work effectively the same?

disown causes a shell not to send SIGHUP to its disowned job when the shell terminates, and removes the disowned job from the shell's job control. Is the first the result of the second? In other ...
0
votes
1answer
463 views

Automatically restarting a process when it dies?

I have a process running on a raspberry pi. After ssh ing into in to the process is started like this: nohup .../blah/blah & IIUC this allows me to log out of the pi and the process keeps ...
1
vote
1answer
688 views

Unable to write to file in shell script when running command in background

I have the following commands that need to be run in a shell script, nohup command >> help.out & When I run the script from terminal the nohup command runs in the background and the next ...
4
votes
2answers
186 views

No log content with tail but when terminating a process I see content with less

Basically, I am running: nohup ./executable &> /tmp/out.log & In order to make sure the process is running I ran the command: tail -f /tmp/out.log But the only thing I can get from tail ...
-1
votes
1answer
193 views

Use nohup and return to terminal and pipe to logger

I can redirect output to logger like this: nohup bin/mytask | logger But the process hangs, and my cursor doesn't return to the terminal after the command is sent. (I would have to return to ...
1
vote
2answers
58 views

Why application does not run from SCREEN without delay?

Suppose we need to run application in screen and keep it running when screen exits. The following command does the job, but only if "sleep 1" is appended to it. Why it does not work without "sleep 1"? ...
0
votes
1answer
498 views

Is there a difference between running a program as a daemon and using nohup with & to run the program?

I'm trying to run my program as a daemon but the way I am doing it currently requires root access. I was wondering if I could use the nohup command with & to push it to the background instead of ...
0
votes
2answers
908 views

Run a script every minute without cron and allowing children

I've written 2 php scripts one worker and one master. If I run master manually it checks a rabbitmq system and spawns 1 worker for each queue it detects. Then if I run master again it checks see if ...
0
votes
0answers
196 views

remote process run through ssh gets killed if UI is closed

I have written a script which essentially does 2 things: Runs a UI for listening to the actual program running on the server remotely run the program on the server All goes well, the UI starts, then ...
1
vote
2answers
167 views

Is it possible to execute a command on server even when I'm disconnected from remote?

Scenario I'm using cp to copy some very big folders, or using tar to compress some big folders. But I have very limited power on my laptop and can't find a power connection nearby. Question Is ...
1
vote
2answers
347 views

sudo nohup and redirection

Trying to figure out the correct Cmnd_Alias for the sudoers file The command i which to run without any password is the following: sudo /usr/bin/nohup /etc/init.d/axtty start >/dev/null 2>&...
0
votes
0answers
116 views

Why does nohup command interrupt?

I put a command in .bash_profile file. The command is: nohup stdbuf -oL -eL sysdig -c spy_users 1>>/path/to/out 2>>/path/to/err & While I am working on terminal it appears: [1]+ ...
0
votes
2answers
3k views

Get python process ID for a flask web site and/or port number?

I have some web applications that I wrote with python flask. I know which port I started each one on and each was started using nohup. Each one was started with something like nohup python mywebapp.py ...