Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nohup]

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

5
votes
2answers
580 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
0answers
21 views

In Ubuntu 18.04 LTS server. A job dies prematurely before completion, even when running inside tmux or nohup

I am using a 18.04 LTS server through an ssh connection. I am running a time-consuming deep learning model training on this server, using tensorflow. My question is that this time consuming job when ...
0
votes
2answers
140 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
33 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
33 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
144 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
310 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.
0
votes
0answers
38 views

VSTS release task stalls after executing nohup command that starts up java service

In VSTS (Visual Studio Team Services), I want to set up a release task, that starts a java service. When I have tried with any of the commands: java -jar service.jar java -jar service.jar & ...
18
votes
2answers
2k 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
635 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
357 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
195 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?
1
vote
1answer
4k 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
551 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
1k 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
143 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
5k 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
6k 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
79 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
2k 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
910 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
43 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
500 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
5k 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
349 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
6k 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....
34
votes
2answers
23k 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
1k 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
10k 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
428 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
103 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 ...
4
votes
4answers
6k 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
9k 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
210 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
850 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 ...
3
votes
1answer
1k 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 ...
43
votes
4answers
137k 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
13k 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
881 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
258 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
3k 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 ...
3
votes
3answers
6k views

Prevent an application from being closed on terminal exit

I have created a bash script that starts an application. Since I wanted the terminal window to close when the application is started, I used this line: firefox & 2> /dev/null; exit; It works ...
5
votes
2answers
6k views

Background process (nohup &) suspends/resumes when user logs out/logs in

Ubuntu Server 11.10 When a normal (non-root) user starts a process with nohup (nohup java ... &), when the user disconnects from the terminal (ssh) the process stops responding. When the user ...
5
votes
1answer
5k views

Launch application via ssh

I am new to SSH. I can connect to a remote computer. I can also launch an application on a remote computer and see its GUI on my screen. But I do not know how to launch an application without it ...
13
votes
5answers
28k views

Bring nohup job to foreground

Consider the following nohup execution: nohup script.sh > script.out & Is there a way to log off the terminal, reconnect, bring the process back to foreground and interact with it using the ...