The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
4answers
238 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
66 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
238 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
59 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 ...
2
votes
1answer
1k 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
16 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
287 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
203 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
116 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
302 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 ...
4
votes
2answers
236 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
237 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
343 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
68 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
302 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
915 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
1k 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
267 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
905 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 ...
2
votes
1answer
760 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
1k 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
389 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 ...
3
votes
1answer
2k 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 ...
4
votes
4answers
3k 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
2answers
389 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
86 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
351 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 ...
4
votes
2answers
2k 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 ...
8
votes
1answer
13k 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
353 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
1k 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 ...
8
votes
2answers
3k 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
953 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 ...
12
votes
7answers
23k views

Execute remote commands, completely detaching from the ssh connection

I have 2 computers, localpc and remoteserver. I need localpc to execute some commands on remoteserver. One of the things it needs to do is start a backup script that runs for a number of hours. I ...
1
vote
1answer
135 views

nohup sends eof (or some other data) info my app when running recursively. How to make it stop or not send at all?

I have a simple small app that suports cin/cout interaction. But there are times (lots of them) when I do not care about that interaction and just want to run my app in background. So I start it with ...
4
votes
3answers
4k views

How to totally fork a shell command that is using redirection

I've written quite a few shell scripts over the years (but I'm certainly not a sysadmin) and there's something that always caused me troubles: how can I fork a shell command immune to hangups in the ...
0
votes
2answers
1k views

ssh + nohup does not work

I'm trying to run a program over SSH that keeps running when I disconnect. This Stack Overflow answer gave me the following command: nohup sleep 30 > foo.out 2> foo.err < /dev/null & ...
6
votes
3answers
3k views

nohup vs. Screen

In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use Screen in this context. Does Screen provide some kind of functional advantage that I am unaware of, ...
9
votes
2answers
573 views

How can I tell a running process to disregard SIGHUP? [duplicate]

Possible Duplicate: How can I close a terminal without killing the command running in it? I have a very low-end "server" running Debian Squeeze that I occasionally ssh to. The system tends ...
4
votes
1answer
3k views

How to make nohup not create any output files and so not eat all space?

So I start some server with nohup ./myServer &, I actually have loging mon my server so I do not need any help from nohup with it, but any way I get 66GB nohup.out file in fiew days and that is a ...
2
votes
4answers
2k views

How to limit the number of lines a command's output has available in bash?

I started downloading a big file in the background using $ nohup wget http://example.tld/big.iso & which also gives me a nohup.out file that includes the output of wget. Now, if I later want ...
1
vote
4answers
914 views

How to prevent a program from dying when its ssh session dies?

I have a really old console application that I want to make a bit more resilient. The program is used this way: the user uses a custom terminal emulator to connect to a remote machine through ssh ...
2
votes
2answers
1k views

How can I keep processes running on a remote server even after turning off the terminal machine?

..and then still be able to return to the same session/screen after restarting the terminal machine. I've tried screen but once I restarted my computer screen -d showed no sessions. Nohup seems to be ...
2
votes
3answers
2k views

Dtach and Vim over Ssh: Reattach Session

I connected to my server: $ ssh me@example.com While in the server, I open a dtach session with vim: $ dtach -c \tmp\my-dtach-session-pipe vim Then my ssh session dies. I attempt to go back to ...
3
votes
3answers
2k views

Using nohup on Solaris 10

I need to transfer a large number of files over SFTP (only between Solaris servers) which takes a very long time. I cannot keep my PC on for this duration. I tried: nohup sftp server1 While the ...
106
votes
1answer
19k views

Difference between nohup, disown and &

What is the difference between $ nohup foo and $ foo & and $ foo & $ disown
5
votes
1answer
3k views

Execute Nohup command with input

In UNIX, I have a process that I want to run using nohup. However this process will at some point wait at a prompt where I have to enter yes or no for it to continue. So far, in UNIX I have been doing ...