Questions tagged [nohup]
68 questions
285
votes
13 answers
Can I nohup/screen an already-started process?
I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen.
Is there any way to "retroactively" nohup a…
ojrac
- 2,953
24
votes
6 answers
How to run script via SSH that doesn't end when I close connection?
I need to run script, that takes long time to execute, or I just want it to run forever. I can't just SSH to my machine, because when I disconnect it stops running.
Is there any way to run script that isn't dependent on the shell that started…
Jakub Arnold
- 1,854
23
votes
7 answers
how to rotate nohup.out file without killing my application
My nohup.out file is growing fast.
I am running an application in the background, it's writing nohup.out file,
now I need to rotate nohup.out file without killing my application. Can this be done?
user2454307
- 331
19
votes
3 answers
Redirect nohup to stdout
Is it possible to let a process started with nohup, write to stdout instead of in a file? or maybe in the file and on the screen?
nohup python start.py &
writes to nohup.out, but I'd like it to output to the screen, nohup is only meant as a hedge…
15
votes
3 answers
What does the ampersand (&) symbol mean with `nohup`?
Ive seen tons of examples where a & follows the end of a command string, but I can't seem to find an explanation on what it does. It's not even in nohup's man page. Is this a shell thing?
Either using & or not, I find that any process ran with…
Chad Harrison
- 7,090
14
votes
4 answers
There is any way to run processes in the background in Windows? nohup equivalent for windows
nohup runs a process in the background. There is any equivalent for Windows?
Jader Dias
- 4,785
12
votes
6 answers
Using nohup when initial input is required
On a linux system is there any way to use nohup when the process that is being nohuped required input, such as an rsync command that needs a password to be entered but will then run happily on its own?
DrStalker
- 7,266
9
votes
4 answers
nohup multiple sequential commands
I need to nohup two commands, one after another. The second command has to be executed AFTER the first command. Here are the commands:
tar -zcf archive.tar.gz.tmp mydir
mv archive.tar.gz.tmp archive.tar.gz
I need the commands to run in the…
Jake Wilson
- 9,133
9
votes
2 answers
How do I get nohup.out flushed more often?
On Ubuntu 10.04, I have a long Python program that prints a bunch of output; I run this under "nohup". However, it waits until the end to put all the text in nohup.out. When I run similar programs under FreeBSD, each line gets sent to nohup.out. Is…
Paul Hoffman
- 2,384
7
votes
1 answer
rsync termiates after a while unexpectedly
I run a rsync command with nohup in ssh session, but after a while it returns this error:
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [generator=3.0.9]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at…
Arash Mousavi
- 698
7
votes
2 answers
rotate nohup out file (nohup.log)
is there a 'native' way where i can rotate nohup out file ?
silviud
- 2,735
6
votes
1 answer
nohup vs screen vs ? for manually starting daemon processes
When I need to start a background process on a low-importance server, I tend to use nohup:
nohup ./server.sh &
Most colleagues seem to prefer screen:
screen -D -R mydaemon
./mydaemon.sh
^A ^D
Are there any major differences in the effect of these…
Steve Bennett
- 6,000
5
votes
3 answers
How to use nohup to continue to run a command after the user logout?
nohup &
When I SSH into a Linux server, if I want to run a command and make sure that it will continue to run in the background after I logout from SSH, I will use the above commands.
Recently I am using a server stack called Bitnami…
userpal
- 623
5
votes
2 answers
How to run rsync without staying logged in?
I want to run the following rsync command to transfer a folder from a remote server to my current one sudo -r -a -v -e 'ssh -p portnum' username@serverip:/home/path/* /home/path this directory is quite large in both size and structure and the…
Euskadi
- 215
5
votes
6 answers
job control and ssh
I can't seem to figure out a decent way to manage jobs over ssh. I want to start a job in an ssh session, logout, log back in, do a fg, check on the job, logout, then repeat the whole process. nohup doesn't seem to wrok well.
I used this command
…
devin
- 1,276