Questions tagged [nohup]

Run a command immune to hangups, with output to a non-tty.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

nohup command stop running after some time interval on ubuntu ec2 instance

I have a situation that I have to subscribed to MQTT channel from the server side to continuously listen for any published message or broadcast. There is device which is connected to MQTT server and ...
0
votes
0answers
57 views

nohup not working? Can't see anything in output and it seems its not iterating properly

I have a pretty basic python twitter bot: picture of code and I don't know why nohup is not working properly through it. count = the # of lines in a txt file (idk if thats helpful) I run this ...
0
votes
0answers
39 views

nohup.out is not being appended to

I have written a Python script that runs on an aws Ubuntu server 24/7. I am using nohup to do this. The program is running without issue, however none of the logs are being written to nohup.out which ...
0
votes
1answer
158 views

run continuous ping at startup

I'd like to have a script running in the background, which pings a remote host every 10 seconds or so. The script looks something like this: nohup ping -i 10 www.google.com & I'm able to ...
1
vote
2answers
374 views

How can I fix nohup, byobu, tmux, screen, etc to not die when I disconnect from SSH?

I'm running KDE Neon which is Ubuntu 18.04 Bionic (LTS) with the latest KDE desktop packages on top of it. Since upgrading to this from Xenial I have lost the ability for processes to survive SSH ...
0
votes
0answers
37 views

“jobs” doesn't list nohup command after relogging

I'm trying to run a program that takes a while to execute and then log off. I believe I should be able to do this with following commands: nohup [the command I'm running] & jobs #the first ...
0
votes
0answers
66 views

nohup works only for a few minutes after logout

I connect to a remote server via SSH. And I want to run a php program in the background on the server after I log out. I have tried using "nohup", but the program only works for a few minutes and then ...
0
votes
1answer
431 views

How do I schedule a Python script to run in a Linux VM?

I tried using crontab but didn’t work. Also, do I need a nohup to keep it running after exit the SSH connection? 02 19 * * * /usr/bin python3.7 myScript.py
0
votes
2answers
324 views

Disown, background, dump to null script

I used to have a script (way back when) that allowed me to execute ANYTHING in terminal and would magically disown and run in the background while dumping any output to null. It may have even nohup'd.....
7
votes
2answers
3k views

How to delete logs automatically after a certain time and restart the process that fills up the log file?

Server is Ubuntu 16.04. I have a process running with nohup that logs into a local file. This file gets big enough to consume 100% disk space. To resolve this I have to kill the process first and then ...
0
votes
2answers
275 views

Running a process through SSH command and keeping it alive

I try running a python program on a remote server using nohup as explained in: How to keep processes running after ending ssh session? When I do ssh server -C "nohup prog.py &", the python ...
1
vote
1answer
431 views

How to truncate a file that is being written to

I have a long running process on a remote computer which I started like this: $ nohup ./process > output & My problem is that the output file is getting bigger and bigger fast. And of course, ...
1
vote
0answers
43 views

Issue with Nohup dying after a few days- running Ubuntu 16.04.4 LTS on Google Compute Engine

I'm running a python script in the background on my virtual machine. The script with nohup works fine for a couple days but the background process seems to die after a few more. Could Compute Engine ...
2
votes
0answers
339 views

Nohup and input params is this possible?

The following prg requires some input after start in the next line: ./myApp param1 param2 -d /home/user/abc Enter password: Is something like this possible: nohup ./myApp param1 param2 -d /...
1
vote
0answers
430 views

How to run an interactive python script with nohup

My script requires entering username and password, how do i run it with nohup along with the ability to interact with it at the same time.
18
votes
2answers
3k views

What is the function of the nohup command?

I am a newbie in Ubuntu. I have learned a command nohup [command] - run <command> immune to hangup signal I can't understand the meaning of "immune to hangup signal". What type of signal it is ...
0
votes
0answers
1k views

How to find out what process I've created with nohup and kill it?

I ran this command: nohup python3 crawler.py > out.txt And I forgot to specify PID at the end of it! Now how can I find out if it's actually running and how can I kill it?
0
votes
1answer
570 views

'nohup' command is not working with 'watch' command

I have tried to run nohup watch -n 5 python3 main.py & but it is not working anymore. Is there any way to run watch -n 5 python3 main.py & command in background?
2
votes
1answer
282 views

When are nohup'd processes stopped during shutdown?

When I shutdown Ubuntu after I started a process using nohup, when and how is it getting stopped? One of the scripts in /etc/rc0.d/ should handle it, shouldn't? Is it S20sendsigs?
2
votes
1answer
9k views

Keep running a python program even after logging-off the ssh session [duplicate]

I python script called scrape.py. As the name suggests it is a web crawler and I want it to run continuously on my Linux machine even after I log out and end the ssh session. I read a lot around here ...
0
votes
0answers
740 views

Using the command nohup for matlab

I would like to launch a matlab script in the background on a remote server by using the command nohup. When I type the command line: nohup matlab MyFile.m outfile.txt & I can't find the .mat ...
1
vote
1answer
2k views

How to increase maxium number of forks in Ubuntu 16.04 [duplicate]

I am attempting to spin up 1000x Docker containers via: nohup docker run --rm --name n-$1-$2 n-v2 bash -c "/root/sw/run.sh $1 $2" 2> ~/logs/log-$1-$2.log & But after about 500x containers I ...
2
votes
0answers
240 views

nohup parallel and rsync out of memory error

I have 10TB of data (around 100Million PDFs) that I'm copying from a Centos box to a new Ubuntu box. I created a script copy-pdfs.sh with this parallel -j 10 :::: jobs.txt and started the process ...
1
vote
3answers
7k views

Using SCP and nohup to transfer large folder between servers

I want to copy a ~50GB folder from one server to another. This is understandably going to take quite a while, so I'd like to be able to perform it "in the background". Using the standard SCP command ...
16
votes
1answer
8k views

How can I prevent nohup from creating the file ~/nohup.out?

I use the command $ nohup ... to start an application in the background so that I can close the terminal window afterwards. Upon execution it creates the file ~/nohup.out. Example: orschiro@x230:~$...
0
votes
1answer
91 views

users and nohup

How can I tell if there are processes running on a system owned by non-system users? I thought the users utility command did the trick, but it only seems to track login sessions and not processes ...
1
vote
1answer
3k views

use “nohup &” always get [1]+ Exit 1 after ENTER

Hi I'm using nohup command-name & recently. My issue is: When I hit Enter, it will show [1]+ Exit 1. and can't finish the command. How can I run the second command while I'm running nohup?
0
votes
1answer
1k views

Some confusion about nohup

Situation1 command find / -name "*.conf" Ctrl+Z to pause the process Situation2 --- hello.sh --- #!/bin/bash /bin/sleep 5000 command ./hello.sh & Situation3 command nohup ./...
1
vote
0answers
50 views

How to run a script at startup and access it later [duplicate]

I want to run a script at startup that I will need to interact with later. I could find ways to run a script at startup, but no ways to come back to it after it has run. The script never ends. I ...
2
votes
1answer
578 views

predefined input in a nohup shell script

I am trying to write a shell script that I can then nohup as it is supposed to run for hours. I am a shell novice so I'm struggling with this a lot. The script should first open some software (ACE ...
2
votes
1answer
7k views

Where can i get nohup.out, if script starts at startup

test.sh in /root/folder #!/bin/bash echo "Hello" #Sample Code Now in th same folder(/root/folder). I have created nohup_test.sh #!/bin/bash while true do sh /root/folder/test.sh sleep 1 ...
1
vote
1answer
517 views

Get GUI back from background application

I started an app (minecraft server) with ssh like this: nohup java -jar minecraftserver.jar & and then logged out. Now that I am next to my computer I can't access the server's terminal. How ...
3
votes
2answers
7k views

Rotate nohup output

I'm working with weblogic 10.3.5 under ubuntu 12.04. Weblogic is started using nohup ./startWebLogic.sh >Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer....
47
votes
2answers
32k views

Differences between “<command> & disown” and “nohup <command> & disown”

This is my understanding about the usage of &, disown and nohup: <command>: runs the process within the Terminal's current bash instance, in the foreground (i.e. the process is listed as a ...
1
vote
1answer
2k views

How do I get nohup to execute [double-]quoted inner commands?

Let's say I want to run echo nested into watch nested into nohup. Starting from the bottom of the stack: echo test No problems with that. watch -n 1 'echo test' watch -n 1 "echo test" No problems ...
5
votes
5answers
15k views

Alternatives to nohup?

I've got an init.d script which I want it to work in the background, even when I quit from the terminal. However I've tried making it run in the background with nohup but had "no hope", becasue when I ...
1
vote
2answers
560 views

Run application nohup-like

Currently I have command pycharm to start Pycharm IDE. I use it like sudo pycharm and this launches Pycharm, but I have to keep terminal from where I've launched it open, because if I close it Pycharm ...
1
vote
0answers
171 views

Hide Terminal and still receive input

I want to run a python script that basically uses the terminal for certain commands, but I don't want it to show the terminal. I've tried running the script as nohup file.py & - this works and I ...
5
votes
4answers
8k views

How can I start a script in a minimised Gnome Terminal?

I can start a command in a new Gnome Terminal as follows: nohup gnome-terminal --window-with-profile=Background --command ls >/dev/null 2>&1& (Based on https://askubuntu.com/a/46630/...
0
votes
1answer
2k views

Run scripts in background in TTY

There are quite a few questions asking what you can do to run a shell script in the background while not running the terminal. Most have advised to use nohup or disown. This might be a stupid ...
4
votes
1answer
11k views

Is there a way to append nohup output file?

I run my script with this command nohup python a.py > /var/log/a.log 2>&1& This is okay but every time I run this command /var/log/a.log file is truncated. Is there a way to append ...
4
votes
1answer
215 views

Is there a utility for hopping in and out of a CLI?

Lets say I've got a bit of server software. I start it up and it provides an interface on stdin/stdout that I can use to enter commands during runtime. I want to be able to start it up over SSH, exit ...
4
votes
1answer
912 views

How to run a nohup script with upstart?

I'm porting some SysV-style service scripts for HBase (a java service) to upstart. The sysv scripts don't call java directly, but instead call hbase-daemon.sh. This is a start-stop-daemon-like tool ...
4
votes
1answer
2k views

Running a graphical application through ssh and keeping it alive

I want to run a GUI application from a remote client via ssh and keep it alive (and eventually reconnect to it) after the connection is closed. As an example: I want, from my home pc, to open a ...
49
votes
4answers
163k views

Run a nohup command over SSH, then disconnect

I want to execute a script, start.sh on a remote server which runs this: nohup node server.js & Naively, I call SSH like this: ssh myserver <<EOF ./start.sh & EOF This starts the ...
2
votes
2answers
1k views

How to hit Ctrl + C on a terminal so that child terminals do not be closed?

This script opens three terminals, but if I hit Ctrl + C where I run this script, all three child terminals will close too! File testChildDetach.sh #!/bin/bash echo $$ while true; do nohup xterm ...
2
votes
4answers
16k views

Nohup with mysql command

I need to run in background mode some mysql-query... But how can i do this with nohup? Standartly i do: musql -uroot -p use SomeDb; Select * from blablalba; But how can i do this with launching in ...
2
votes
4answers
1k views

How to short this command?

Every time I need to use sublime to open a project from terminal, I have to do this: nohup sublime . & Is there a way to short it?
0
votes
2answers
269 views

the relationship between terminal and the process

Mostly, if I closed the current terminal, the sub_process are also closed. Of course, if I use suspend the process and use `bg JobID wakeup it, the process is divided with the terminal and run in ...
8
votes
4answers
4k views

Keep a program running in terminal

So I am well aware of nohup and suffixing commands with & to ensure that they go into the background. However if I run a graphical application - sometimes using neither seems to do the job. So ...