Tagged Questions

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

learn more… | top users | synonyms

0
votes
1answer
14 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
77 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
18 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 ...
2
votes
1answer
40 views

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

In a Gnome Terminal tab, I ran $ nohup chromium-browser & But when I close the terminal tab, chromium-browser also exits. Isn't nohup supposed to prevent that? I am seeing this on other ...
0
votes
1answer
78 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
71 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
107 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
161 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
174 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
160 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
110 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
331 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
749 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 ...
2
votes
3answers
165 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
265 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 ...
5
votes
4answers
1k 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
147 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
2k 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 & Now, the latter ...
1
vote
1answer
210 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 ...
4
votes
1answer
7k 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 ...
0
votes
0answers
17 views

nohup: ignoring input and redirecting stderr to stdout [duplicate]

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
459 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
757 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
302 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
520 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
900 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
296 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
654 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
82 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
991 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
1k 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
482 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 ...
2
votes
1answer
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
1k 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
3k 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
812 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 ...
4
votes
2answers
4k 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
7k 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
1k 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 ...
1
vote
1answer
98 views

How get program name that produced an IO error redirected to a LOG in a nohup command?

I have a program that executes other programs in the background. The main program would be programA, and the programs executed by the main one, would be program1a, program1b and program1c. I need the ...
3
votes
2answers
663 views

Disown won't take -h option

I'm running a command that I now realize I'd like to leave running after I close my SSH session. I didn't start it with a & argument, but I have put it in the background (CTRL-z, bg). Now I'm ...
6
votes
2answers
5k views

Is it possible for nohup to write the output both to the file nohup.out AND to the screen/terminal?

I am using the bash shell. I frequently use nohup to ensure that my processes are not stopped when I close the shell/terminal that started them. I use a syntax like: nohup myprocess When ...
19
votes
4answers
9k views

How to Execute multiple command using nohup

I want to execute multiple command using nohup, And each command should execute after previous command, I used this command for example: nohup wget $url && wget $url2 > /dev/null ...
12
votes
1answer
26k views

Is there a way to redirect nohup output to a log file other than nohup.out?

I frequently use the program nohup so that my processes are immune to hangups. So if I want to make the program program immune to hangups, I use the command nohup program & where & puts ...
1
vote
2answers
2k views

How to make a program which run from shell still live after close terminal? [duplicate]

Possible Duplicate: How do I prevent a script from terminating when the shell exits? I use gnome-terminal, and I run emacs under the terminal in the background by executing emacs &, but ...
3
votes
2answers
472 views

Why do 'nohup' and 'disown' not work on SoX (invoked as 'play')

I can run this command: $ play mylist.m3u And music plays. I can then press Ctrl-Z to suspend the job, and issue bg to have it run in the background. However, if I then run disown and exit, the ...
5
votes
3answers
2k views

Why `> my.log 2>&1 &` causes the job to sustain log out?

I use myscript > my.log 2>&1 & to run a script and collect it's output - so that when I logout - the script will still be running. It I were to start it with myscript & - it will ...
10
votes
3answers
4k views

When do you need 'nohup' if you're already forking using '&'?

First this question is related but definitely not the same as this very nice question: Difference between nohup, disown and & I want to understand something: when I do '&', I'm forking ...
6
votes
3answers
1k views

Why are background jobs started by my shell living longer than the parent shell and controlling terminals?

It is commonly said that "&" puts the process into background execution, but that process would be killed when terminal is closed. But from what I see, everything I sent into background was ...