Questions tagged [nohup]
The nohup standard utility and the nohup builtin from shells like csh, which cause the SIGHUP signal to be ignored
282
questions
0
votes
1
answer
51
views
Why is tee stopping in the middle when piped with nohup?
I'm running a script (in a Laravel project) that takes a few hours to complete. nohup to prevent it from exiting if my ssh session is disconnected.
nohup php artisan do:thing 2>&1 | tee ~/tmp
...
-1
votes
1
answer
89
views
Why does running rsync using nohup consume all of a system’s memory? [closed]
Through both testing and plenty of examples on various stack exchanges, its clear that running rsync using nohup causes memory exhaustion, while the same rsync job running via screen or an active SSH ...
-1
votes
1
answer
45
views
Can you make nohup.out get created only on errors without manually specifying the file name?
Can you make nohup ./file $1 $2 & (which runs ./file in the background) create nohup.out only for errors and not for standard output?
But please without manually specifying nohup.out i.e.
nohup ./...
0
votes
0
answers
32
views
why the nohup background process did not started
I am using this script to startup my application:
#!/usr/bin/env bash
set -u
set -e
set -x
nohup pdm run python3.10 /root/visa/main_api.py > /root/visa/starup.log &
tail -f /root/visa/starup....
0
votes
0
answers
33
views
When I ssh to the host in pycharm,after displaying 'Starting the remote IDE backend' for a long time,there shows a Deploy Failed window
Here.
They are "nohup:ignoring input" and "stderr is empty".
By the way,in the previous try the number of "nohup:ignoring input" was 3.
And then I remove that connection ...
1
vote
1
answer
39
views
Background process is not being terminated by SIGINT when executed via ssh
I was experimenting with ssh, nohup, bg etc. I started a tail process in remote using
$ ssh remotehost '{ nohup tail -f ut.log &> /dev/null < /dev/null &} && echo $!'
It ...
0
votes
1
answer
163
views
How Can I Add Dates To Nohup Log Files Lines
I'm running python on my server. I want to add date and time info to my nohup log file's lines.
Log file content similar to what I want to do (inside log file):
09/09/2023 07:13 Traceback (most recent ...
0
votes
0
answers
28
views
how to put an existing process into an interactive shell's foreground [duplicate]
Say I started a long running process with nohup. As predicted, I close the current shell session. I open a new one and then I would like to add the still running process to the foreground (or to the ...
0
votes
0
answers
44
views
Why does bash send SIGTERM to program after logout despite setting nohup and disown
I want to run a program which continues after logout from an ssh session.
I've tried:
nohup myProg > /tmp/logfile 2>&1 &
disown %1
and
systemd-run --scope --user myProg -p > /tmp/...
0
votes
1
answer
163
views
nohup inside a script, started with at
I want to run a postgres dump from a remote server which will take a couple of hours.
I am using a bash script on the target to do so and start it with at
Now, in order to prevent things from breaking ...
0
votes
0
answers
105
views
Continue running on remote linux server in an conda environment
I am working in a conda environment and want to keep running after my disconnect. Normally, I use nohup for this purpose but is it possible to use nohup in a conda environment?
nohup bash program.sh ...
0
votes
1
answer
568
views
Can I use nohup in a conda environment?
I should run a program in a conda environment in a remote linux server connected via ssh, which takes really long. Can I use nohup so I can logout? Will there occur any problem due to conda ...
0
votes
1
answer
92
views
nohup process pid not visible in new shell but still in old shell
I open and connect an ssh terminal window shell to my server and run this:
nohup sleep 50000 &
When I then run ps I see this:
PID TTY TIME CMD
1 ? 00:00:00 bash
56 ? ...
-3
votes
1
answer
389
views
Nohup doesn't work with my Windows syntax from WSL2
I am running Tiddlywiki as portable from OneDrive, following this tutorial.
I am running this from WSL2:
cd /mnt/c/Users/mobil/OneDrive/node && nohup cmd.exe /c tiddlywiki.cmd mynewwiki --...
0
votes
1
answer
164
views
How to NOT append nohup output to a file but replace it?
Lately I needed to be able to run a script in the background and monitor its output from another machine. For this reason I was able to use this command:
$ nohup ./rsync.sh > ./output.txt
This is ...
0
votes
1
answer
94
views
Run a command in background and independent of terminal and run alternative if fails
Goal: To run a command independent of the terminal and return immediately. And if the command fails run an alternative commands independent of the terminal and return immediately.
I did the following. ...
0
votes
1
answer
3k
views
What does the error stty: 'standard input': Inappropriate ioctl for device Can't obtain kerberos tickets mean?
I ran the command:
nohup sh -c "echo $SU_PASSWORD | /afs/cs/software/bin/reauth; python -u ~/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/...
1
vote
2
answers
1k
views
Bash script to start java spring boot application from SSH
I have a simple bash script file, which is triggered from pipeline job ( via SSH ).
The deploy.sh contains more or less something like this:
cd /apps && java -jar "-Dspring.profiles....
0
votes
1
answer
77
views
Mistakenly started a long running task on an ssh shell
I understand that a long-running job on a server should be started with nohup/screen/tmux. But sometimes by mistake, I will start a job w/o realizing how long it would take. For example, I recently ...
2
votes
1
answer
426
views
How does one send new commands to run to an already running nohup process or run two commands together/concurrently in nohup?
I want to run a nohup job and to that already running process run a specific new command (e.g. kerberos authentication). In fact the ideal solution would be to first run the reauth command and then ...
0
votes
2
answers
1k
views
How do I wait for a process to end and then do a series of actions (e.g. kill a tmux session) without blocking my main terminal?
I am trying to "re-implement" nohup inside of tmux (so dispatching a job without blocking me and then killing the tmux command acting as nohup). My attempt is here (and it has several issues ...
1
vote
1
answer
61
views
How to run the follow sample in own process or processes?
The Environment is a Linux like Debian or Ubuntu.
I have two examples; one is working fine, the other is not. How can I fix the non working one?
First example:
Here, I run commands in a terminal to ...
1
vote
1
answer
491
views
Redirect output of nohup in a .sh file doesn't work properly
I want to run a lot of python scripts and save their outputs. Because running one by one in terminal is too cumbersome. As suggested, I decide to use a shell script (.sh).
To simplify the problem, let'...
2
votes
3
answers
1k
views
Execute several scripts at the same time with nohup
I want to execute four scripts at the same time with nohup. These scripts are all in the same folder.
Would something like this work?:
nohup /.scrip1.sh & /.scrip2.sh & /.scrip3.sh & /....
0
votes
0
answers
215
views
nohup bash function
In my .bashrc:
function keepassxc(){
"/Applications/KeePassXC.app/Contents/MacOS/KeePassXC" "${@}"
}
export -f keepassxc
From Terminal:
$ nohup keepassxc
nohup: ignoring input ...
0
votes
1
answer
1k
views
nohup: can't execute 'display_files.sh': No such file or directory
I want to run my code with
nohup shellskriptname &. But whenever I try to see the nohup, it says there is no such file. What can I do, so I can enter it like that?
#!/usr/bin/bash
# To Display ...
0
votes
0
answers
332
views
"nohup python3 .. &" ends once I disconnect from a server
This command
nohup python3 main.py > my_log.log 2>&1 &
will end once I disconnect from a server. That is, if I disconnect and then connect 10 seconds later, the task, or a job, will be ...
0
votes
0
answers
85
views
Why does Neovim behave differently from Geany when launched with nohup and &?
When I open Geany I need to launch it with nohup, e.g. nohup geany test.txt & so that when I close my shell,
from which I launched it Geany does not get closed. I noticed that this is not the case
...
1
vote
0
answers
128
views
Multiple Scripts all in one with breaks [closed]
I’m writing a script where instead of using ‘sleep 600’ (for example), i actually want to execute another script for the same amount of time as sleep.
So basically, instead of “doing nothing” for 10 ...
0
votes
1
answer
776
views
why websocat or wscat in background with nohup, disown, bg, &, &! don't work
The question is about running a bash script in background with the ability to logout and the process to continue. The issue is that websocat and wscat don't like when I close the terminal or logout.......
0
votes
2
answers
689
views
When a program/process is started in bash without nohup, is it later possible to let this program run even after the shell/terminal is closed
When a program/process is started in bash WITHOUT nohup, is it later possible(do something further) to let this program run even after the shell/terminal is closed.
Here is a great discussion on ...
1
vote
1
answer
796
views
How do I use SSH to launch a nohup ffmpeg command and leave it running after disconnect?
I'm trying to launch a series of FFMPEG commands over SSH. My SSH client is the native openssh (7.7.2.1) client in Windows Server 2019 (ver 1809 build 17763.2114). The command I am trying to run is ...
0
votes
1
answer
459
views
Running nohup many times in a script
Related to an earlier question I asked here. So I have the following script:
requests=(25 50 75 100)
factors=(3 6)
graphsizes=(25 50 75)
for request in "${requests[@]}"
do
for factor in &...
0
votes
1
answer
296
views
How to run this simple command in the background
I am having a really hard time trying to run the command below on the background:
find /dir -iregex ".*\.\(jpg\|jpeg\)" -exec jpegoptim --strip-all {} \; -exec sleep 1 \;
I tried adding ...
0
votes
1
answer
149
views
Oracle Linux 6.7 - Nohup: Argument list too long
There are 1 million directories and some files in directories (.pdf, .csv etc.) under the path I have specified below:
/data/upl/repo/exp/
I want all files and folders older than 1 year to be deleted,...
1
vote
2
answers
20k
views
Can not stop nohup process
I am trying to run a very complex statistical model that I expected to take a very long time, so I used nohup to run the process. However, I underestimated the length and it would take like 260+ days ...
1
vote
1
answer
2k
views
Dynamic changing PID - nohup process not killable - Linux
I have started a python script by following:
nohup python src/myscript.py &
Now there is a process running, where the PID is changing constantly, so it is absolutely not possible to kill it. When ...
1
vote
0
answers
352
views
Not able to run a nohup script inside a ksh
I'm trying to read a text file (containing set of instructions)
#!/bin/ksh
INPUT=input.txt
OLDIFS=$IFS
while IFS='~' read -r ACTIVE process_name PATH STOP START DB
do
if [ $ACTIVE == 'Y' ]; ...
4
votes
2
answers
6k
views
How to run a sudo process using nohup?
How can I run a sudo command using nohup? I want to execute a sudo command and then terminate the ssh session but without interrupting or stopping the process.
I tried this but it doesn't work
sudo ...
0
votes
0
answers
769
views
NOHUP stopped working
I've been using nohup for years on my server without any issue. Suddenly today it stopped working and the process ends as soon as I exit SSH. I have multiple accounts on this server and the problem is ...
0
votes
1
answer
173
views
How to add nohup jupyterhub in service
Have installed jupyterhub locally. for starting it I'm using this command
conda activate jupyterhub_environment and then
nohup jupyterhub
how to add this commands in service so that it can start ...
2
votes
1
answer
644
views
Script called with nohup dies sometimes when calling script exits
I wrote a little bash script showing a screenshot menu (screenshot-menu.bash):
#!/usr/bin/env bash
echo 'Select an option:
s whole screen
w active window
r select region
'
read -rsn1 key
sleep 0.1
...
0
votes
2
answers
2k
views
Keep python script running after ssh closed
I am trying to run a script called script.py on a remote CentOS 7.3 box that I ssh into. I am running the script from an environment called py. I want the script to continue running after I disconnect....
-1
votes
1
answer
1k
views
What is the difference between nohup and crontab? [duplicate]
Say I want to delete the contents of a directory every hour, what is the difference between having let's say a python script do this for me: nohup python dir_cleaner.py & vs setting a cronjob to ...
0
votes
1
answer
850
views
How to send "enter/any key" signal when using nohup?
For example, I've executed a script using nohup and & to put the script execution in background, and in some step the script ask me to do something else to be able to continue the current ...
2
votes
1
answer
6k
views
nohup ends when I close the SSH terminal and doesn't show up on ps/job when running
I have an AWS EC2 Ubuntu 20.04 instance, accessed via puTTY SSH. Running a Python process via OpenMPI through the following command on non root:
nohup mpirun python3 job.py
When the shell is open it ...
2
votes
0
answers
150
views
Using nohup and & on remote Mac OS X causes process to become idle?
I am running some code on a remote server (an iMac), and I want the process to keep running after I log out.
So, I am using nohup and &. However, the process becomes idle when I leave (log off) ...
0
votes
1
answer
206
views
starting Python IDLE with setsid or nohup requires a sleep
A bit of context: I am creating a small Python programming lab for novice users. I want them to use Python's IDLE editor (which you launch as python -m idlelib) but since they may not be comfortable ...
5
votes
1
answer
1k
views
How to limit the number of background process in Unix
I have to run a script in 100 parts while making sure that only 10 parts run at parallel at any point of time.
Below script will trigger all the 100 processes at the same time :-
for i in {1..100}
do
...
0
votes
1
answer
839
views
sudo error when using nohup to run programs in the background
I have a simple exec running in my terminal to run program.py in the background using nohup. Here is the script:
cd "$(dirname "$0")"
sudo -v
nohup sudo python3 program.py &
...