Questions tagged [nohup]
68 questions
283
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,933
- 3
- 18
- 5
23
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,744
- 10
- 26
- 33
22
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
- 321
- 1
- 2
- 3
16
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…

Davoud Taghawi-Nejad
- 571
- 1
- 5
- 9
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,705
- 19
- 50
- 51
13
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
- 6,990
- 10
- 29
- 41
10
votes
5 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
- 6,946
- 24
- 79
- 107
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
- 8,814
- 29
- 97
- 125
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,214
- 5
- 19
- 23
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
- 678
- 3
- 8
- 21
7
votes
2 answers
rotate nohup out file (nohup.log)
is there a 'native' way where i can rotate nohup out file ?

silviud
- 2,687
- 2
- 18
- 19
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
- 5,750
- 12
- 47
- 59
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
- 613
- 4
- 10
- 17
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
- 1
- 2
- 7
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,246
- 3
- 20
- 27