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

learn more… | top users | synonyms

0
votes
2answers
22 views

nohup not updating nohup.out

Boiling down to the smallest problem here is a simple python script that I want to run using nohup on linux. I run it using the following (on linux): nohup python test.py & The command seems ...
1
vote
2answers
28 views

Automatic Background Processes

I'm running my Raspberry Pi off an SSH server, and want to be able to access it out of home. Sure, all I need is an IP. But with my terrible internet, it's constantly dropping out. My IP is constantly ...
2
votes
3answers
48 views

Preventing terminal disconnection from killing a running job in zsh [duplicate]

I went through the top answer to this question: Difference between nohup, disown and &, and I read specfically the following: With disown the job is still connected to the terminal, so if the ...
0
votes
0answers
26 views

Start a process from (noninteractive) shell script (cgi) and keep it running when script ends

I want a cgi script to start a process which stays alive after the cgi script exits. I tried: #!/bin/bash nohup process-to-keep-running & That works fine, if I run the script from an ...
3
votes
3answers
69 views

Using `nohup` to Import MySQL Dump on Debian Server

I am trying to import a mysqldump file into my mysql database, but my (putty) connection to the server keeps timing out halfway through. I tried to use nohup . . . . & but this doesn't appear to ...
1
vote
0answers
37 views

nohup not working when called from root folder

When i execute nohup command from the same folder it's working fine (server.php is used to listen to a port 7070) root@servername:/var/www/html/admin# nohup php server.php & [4] 2803 ...
1
vote
2answers
61 views

how to use nohup while still sending stderr to the terminal

nohup automatically redirects stderr to stdout, but I want to send it to the terminal (it shows progress). How can I do that?
2
votes
2answers
77 views

stderr gets flushed before stdout, when using file logger

My python code: import sys print "i am a daemon" print "i will be run using nohup" sys.stderr.write("i am an error message inside nohup process\n") When i run the code as python a.py, it shows, i ...
0
votes
0answers
59 views

Avoiding heredoc sh[process_number].* files in /tmp directory

I have a .ksh file which logs into sqlplus and runs some queries. The block of code is something as mentioned below: //Other things done in ksh sqlplus -s @connect.sql << EOF Query1 Query2 ...
2
votes
1answer
96 views

Get the time when nohup R program finishes

I want to get the time when program finish. But it always show the same time. Here is my shell script. But it always show that START TIME is same as END TIME. START=$(date +"%r") nohup Rscript ...
2
votes
1answer
134 views

what are practical uses of stdbuf or nohup?

I have to finish a writeup of a few coreutils commands for a course at the moment, and I can't think of a starting point for a small practical code example that demonstrates the potential uses of ...
1
vote
1answer
106 views

Is there any disadvantage of executing a shell script using nohup?

To execute a shell script in background and without an interruption, we use nohup command. For example: $nohup mytest.sh & Press ALT Press Enter Is there any drawback or disadvantage of this ...
0
votes
1answer
103 views

Keep program running after logging out SSH -X, and reopening it later [duplicate]

I need to login to my school computer where I am running an experiment. I am logging via SSH -X since it uses a custom made GUI application. I want to be able open the program, make it start ...
0
votes
0answers
26 views

how can I redirect the grepped output of tail -f to a file? [duplicate]

I want to do this: tail -f /var/log/apache2/access.log | grep 'POST \/review' But I want the output to go to a file and I want this to run constantly for a day or two. I tried a simple script ...
4
votes
1answer
228 views

Why is `setopt nohup` required to make `nohup watch` work in zsh?

In zsh, setopt nohup seems to be required to make nohup work, as follows: # nohup does not work without setopt nohup ➜ /tmp zsh ➜ /tmp nohup watch ls & [1] 31556 nohup: ignoring input and ...
0
votes
1answer
60 views

what is the difference betwwen starting a command with nohup and &? [duplicate]

nohub and & seem to have a similar effect on the surface, they both start processes without occupying the shell from which they have been started, how do they differ on a deeper level?
3
votes
1answer
129 views

What is the difference between letting nohup append to 'nohup.out' and explicitly redirecting it to a file?

Consider the following scenario: tail.sh: #!/bin/bash tail -f test.txt invoke.sh: #!/bin/bash nohup ./tail.sh & invoke_explicitredirect.sh: #!/bin/bash nohup ./tail.sh > out.log & ...
0
votes
1answer
256 views

nohup, screen and tmux not working when closing connection on yocto linux (intel edison)

I have an Intel Edison with Yocto Linux and standard configurations. It had nohup pre-installed and I managed to install both screen and tmux (by compiling them from sources). Now, I would like to run ...
1
vote
1answer
585 views

How to keep running a process in Android when disconnecting adb terminal? command “nohup” not found

I'm trying to analyze the reason for random reboots of my phone (see here). Therefore I wanted to record the logcat and kernel messages till the restart to see the logs even after the usb disconnects, ...
1
vote
1answer
454 views

Running script need two command with nohup

I want to run a script with nohup because it takes long time but it needs a password to run. how can I write the command using nohup. For example to run the script interactively I first run php hat ...
2
votes
2answers
263 views

How to read from a named pipe after the writer process exits?

I want to use named pipes as asynchrnonous task queues (JMS-like, perhaps). For example, suppose a client sends some data that I wish to insert into a database, but I want the client to disconnect ...
0
votes
1answer
90 views

Why process wasn't killed after closing SSH connection

I launched this command via SSH on a Debian server: watch --precise -n 1 top -b -n 1 -p 27330 | tail -n 1 | awk "{print \$9}" >> 27330.log & After a while I quit my terminal. When I ...
3
votes
3answers
470 views

Why is chromium-browser killed when I close the terminal despite nohup?

This question is old, and I am still not clear about why. Original question in 2014: In a Gnome Terminal tab, I ran $ nohup chromium-browser & But when I close the terminal tab, ...
0
votes
1answer
140 views

SSH to a server, execute update command that continues even after logging off the ssh session

Okay I saw a lot of questions like this, but almost all have either theoretical answers which do clear the concept but I am still not able to put it up in code. What I want to achieve using a bash ...
4
votes
1answer
133 views

How to completely detach a process

I want to spawn a process and run it at the top level so that when the shell exits, the process keeps running. I had mistakenly thought that nohup would do this, but when I exit from the shell (the ...
0
votes
1answer
592 views

Keep a PHP script running indefinitely on a Web Server [duplicate]

I'm having a pretty big issue that I need to get resolved. Basically I have little experience using Linux and I've been working on a project recentley that involves me having to use quite a lot of ...
1
vote
3answers
2k views

Using nohup to keep a script running indefinitely

I am very new to Linux and I've only been using it to SSH to my web server using Putty. The issue I am having is this: Basically I've got 2 php scripts. One get_tweets.php constantly listens for ...
1
vote
1answer
1k views

How do I Nohup an interactive shell-script?

My Script is having 2 command-line arguments and then just couple of questions, after these questions the script will run for itself, I'm able to pass the command-line argument by just doing, ...
-3
votes
4answers
1k views

Why doesn't the nohup command seem to be working?

Please let me know any example that shows nohup is working for a program even after logout. I tried using it without the nohup command to run a script in the background and it seems to be working even ...
4
votes
0answers
234 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
0
votes
1answer
933 views

aix ksh start weblogic server without nohup.out and return to underlying script

I am writing a ksh script, in which I want to start weblogic server in background and return to underlying script immediately(continue to execute the script) like this: nohup ...
0
votes
1answer
3k views

Running both sudo and nohup on a command

There is a complex command that requires sudo: sudo command par1 666 /home/me/... I need to launch it so that it persists after I log off from terminal (SSH). I have discovered that nohup command ...
6
votes
3answers
13k views

Why use “nohup &” rather than “exec &”

I know that, nohup being a binary, it can be reached from any shell. But the exec built-in probably exists in every shell. Is there a reason to prefer one of them, to the other?
1
vote
1answer
363 views

nodejs sub processes in nohup bash script lock up

I run scripts with nohup that contain a list of a few hundred to a few thousand nodejs commands. These nodejs sub processes sync data from mysql and salesforce to couchdb. $ nohup ...
6
votes
4answers
3k views

Process java still being killed

I need to run a java program on my university servers. I'm remotely logging in through their servers via ssh So I used nohup like so: nohup java -jar project.jar & However when I logout and ...
3
votes
3answers
322 views

Log to multiple files while process in background (nohoup)

I have bash script that logs to two log files in parallel. echo "$(date) | [STATE] Activating IP forwarding" >> $logsPath$logFileName echo $(date +"%Y-%m-%d %H:%M")","$previousState >> ...
9
votes
1answer
5k views

Why does 'nohup command >& /dev/null' seem to “work” in some shells?

I edited an answer on Ask Ubuntu that was suggesting the following nohup gedit >& /dev/null & When they actually meant nohup gedit &> /dev/null & The latter correctly ...
1
vote
1answer
492 views

service killed at ssh hangup [duplicate]

If I use ssh to run some command in background, that command gets killed as soon an ssh hangs up: ssh localhost -t "bash -c '(for i in 1 2 3 4 5; do sleep \$i;done)&'"; ps x|grep sleep This ...
6
votes
2answers
15k views

nohup: ignoring input and redirecting stderr to stdout

I am starting my application in the background using nohup as mentioned below - root@phx5qa01c:/bezook# nohup java -jar ./exhibitor-1.5.1/lib/exhibitor-1.5.1-jar-with-dependencies.jar -c file ...
4
votes
2answers
709 views

Gaussian, which is run with nohup on remote linux machine, gets killed when the local computer is powered down before the shell is exited

I have a problem running Gaussian on remote Linux via SecureCRT on Windows. Gaussian Gaussian spawns different child executables ("link"s) when running. For example, I start Gaussian by running ...
2
votes
4answers
1k views

How to run new background command sequentially if I already have a nohup background command running?

Say I already have a background running command1 nohup command1 & Now I want to submit command2 into background, But I don't want command2 to run immediately. I want command2 to start running ...
0
votes
2answers
626 views

Kill a nohup mpi process

I have started a program in parallel using the command: nohup mpirun -7 mylongprogram.py & I now want to terminate the program. When I want to kill the process by the command: kill -9 ...
2
votes
4answers
668 views

Keep running program requiring X server after logging off of ssh session

I have a python script that periodically generates a png image, and puts it on a server that I can access through a browser. The image displays the progress of a job I am running on the server. I'm ...
5
votes
2answers
2k views

“nohup sudo …” does not prompt for passwd and does nothing

When I run nohup sudo myscript.sh & I only get something like [1] 1220 in return and do not get prompted for a password. The process does not start either. I want to run this script in the ...
5
votes
3answers
387 views

Perl alternative for screen/tmux for the UNIX world?

What happens when a screen/tmux-like solution is needed (to leave a process running for a long time, but not with nohup because interaction could be needed) - but screen/tmux is not available on the ...
3
votes
3answers
1k views

netcat doesn't work as expected when detached from console with nohup (Ubuntu/Debian 64bit)

I'm trying to leave netcat running and close the ssh session (even stop the ssh daemon). But it then exits before all of the data is written. I'm testing in a non-ssh (local) console: nohup nc -l -p ...
2
votes
1answer
119 views

Running services without sudo

I want to run a nodeJS web server on a couple of machines which I don't have sudo access on. What would be a good way to do this? The two requirements are: running the service without being ...
0
votes
1answer
2k views

Nohup process not running into ssh

I have a question on the use of nohup in an ssh session. During more than three years my java software executed the following command daily using a remote ssh session: cd some_path; chmod 777 ...
2
votes
0answers
2k views

How to run ssh -t user@remote 'sudo nohup bash -c “comand”' in background

I want to run a script on a remote host with sudo privilege, someone suggests that I should use nohup and ssh -t, like the following command: The script ls; sleep 10; echo finish is crafted here to ...
2
votes
1answer
3k views

redirection to file issues with nohup and pipe

For the following command: ssh -t esolve@hostname 'sudo nohup bash -c "ls > log 2>&1 &"' I always got error information: nohup: ignoring input and appending output to ...