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

learn more… | top users | synonyms

1
vote
1answer
17 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 ...
-1
votes
0answers
27 views

Why can google-chrome with disown survive closing terminal, while not with nohup? [duplicate]

From gnome terminal, I found that google-chrome & disown can make google-chrome survive closing the terminal, while nohup google-chrome & doesn't. I wonder why the difference? My ...
2
votes
1answer
47 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
48 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
42 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 ...
3
votes
1answer
88 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
43 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
76 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
169 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
320 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
220 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
179 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
71 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
223 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
119 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
102 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
358 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
974 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
740 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, ...
-2
votes
4answers
376 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
182 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
758 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
2k 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 ...
3
votes
3answers
3k 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
306 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
2k 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
241 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 >> ...
8
votes
2answers
4k 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
374 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 ...
5
votes
1answer
11k 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
622 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
490 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
626 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
1k 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
360 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 ...
2
votes
3answers
949 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
101 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
2k 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 ...
0
votes
1answer
551 views

Starting Resque worker with script doesnt work, starting by hand does

I am trying to figure out why my process doesn't work if started via a script, but works fine if started by hand. Here's the details: script is a resque worker start script. The script location is ...
3
votes
2answers
2k views

What does a “[1]+ Exit 1” response mean?

I ran this command to try and get my python program to run in the background and let me exit the SSH connection I am using: nohup python files.py >> files.log & I then check ps to check ...
3
votes
1answer
2k views

starting server with nohup and redirecting input, output

I have a init.d script that starts a python socket server. Because I want this to run as a daemon, I use nohup to start it. I also want to redirect stdout and stderr to a log file. My problem is ...
1
vote
2answers
4k views

How to know if a background job is finished?

I invoke a script (do_something) in background via another script (do_manythings) as below. nohup do_something & How would I know in the parent script (do_manythings) that the job invoked ...
3
votes
2answers
1k views

Simulate empty STDIN to detached command

i want to detach command either with 'command &' in the end, or with 'nohup command &', but it stops right after detaching it. command is little specific, if it receives eof on input, it ...
6
votes
2answers
6k views

Having an rsync job complete after closing SSH connection

I am transferring a large amount of files from one computer to another using rsync. I am doing this by SSHing into the source computer and executing a command like this: sudo rsync ssh ...
5
votes
4answers
10k views

Running multiple nohup commands in background

Got two commands cmd1 and cmd2. Of the two, cmd2 takes longer to finish. Need to run cmd2 and then cmd1. Tried to run them in following way: bash$ (nohup ./cmd2>result2 &) && nohup ...
0
votes
3answers
2k views

Kill nohup command on cluster

Last night I launched a command via nohup on a cluster and then closed the connection. Today I would like to kill this job (I know it's still running because output is being generated in an output ...