Questions tagged [nohup]
68 questions
281
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…
![](../../users/profiles/9253.webp)
ojrac
- 2,913
- 3
- 17
- 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…
![](../../users/profiles/10157.webp)
Jakub Arnold
- 1,674
- 10
- 25
- 33
17
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?
![](../../users/profiles/238853.webp)
user2454307
- 171
- 1
- 1
- 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…
![](../../users/profiles/125164.webp)
Davoud Taghawi-Nejad
- 551
- 1
- 5
- 9
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…
![](../../users/profiles/81366.webp)
Chad Harrison
- 6,960
- 10
- 28
- 41
13
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?
![](../../users/profiles/958.webp)
Jader Dias
- 4,625
- 18
- 48
- 50
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?
![](../../users/profiles/11495.webp)
DrStalker
- 6,676
- 24
- 76
- 106
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…
![](../../users/profiles/21307.webp)
Jake Wilson
- 8,494
- 29
- 94
- 121
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…
![](../../users/profiles/11131.webp)
Paul Hoffman
- 2,094
- 4
- 18
- 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…
![](../../users/profiles/152804.webp)
Arash Mousavi
- 658
- 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 ?
![](../../users/profiles/62466.webp)
silviud
- 2,677
- 2
- 16
- 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…
![](../../users/profiles/68259.webp)
Steve Bennett
- 5,539
- 12
- 45
- 57
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
…
![](../../users/profiles/48818.webp)
devin
- 1,226
- 3
- 20
- 27
5
votes
4 answers
How do I find out the process id of the backgrounded process?
I've got a command (program) that I'd like to run with nohup and background it. Like
nohup command > logfile.txt &
How do I find out the process ID? I would like to be able to write the process id in a file, read it later and kill the process…
user66336
4
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…
![](../../users/profiles/126549.webp)
userpal
- 593
- 3
- 9
- 17