Questions tagged [nohup]

The nohup standard utility and the nohup builtin from shells like csh, which cause the SIGHUP signal to be ignored

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 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 ...
  • 1,384
0 votes
0 answers
22 views

how to separate command line output and nohup log?

I was running a command line on a virtual server with nohup. So, originally, my command line is nohup hisat2 -argument > output.sam & Basically, the default setting for hisat2 -argument prints ...
0 votes
1 answer
42 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
40 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 ...
  • 3
0 votes
0 answers
23 views

.NET core application does not start during autostart

On my Ubuntu machine I configured script autostart.sh which is executed at the end of the boot sequence as root user. Within that script there is: echo Starting application >> /var/log/autostart ...
0 votes
0 answers
28 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
78 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
167 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.......
  • 115
0 votes
2 answers
187 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 ...
  • 604
1 vote
1 answer
301 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
173 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 &...
  • 137
0 votes
1 answer
173 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 ...
  • 35
0 votes
1 answer
71 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
1 answer
4k 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
871 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 ...
  • 113
1 vote
0 answers
180 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' ]; ...
  • 11
3 votes
2 answers
2k 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 ...
  • 131
0 votes
0 answers
257 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 ...
  • 1
0 votes
1 answer
64 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
182 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 ...
  • 259
0 votes
2 answers
807 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....
  • 101
-1 votes
1 answer
746 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
294 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 ...
  • 379
0 votes
1 answer
2k 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
51 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
130 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 ...
4 votes
1 answer
631 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
342 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 & ...
0 votes
2 answers
1k views

Bash Creates Child Process Using && and not with ; for a nohup programm

I have a macbook (default shell is zsh) I have an executable python script (srcript1.py). I use another executable script (called starter) that runs script1.py when my computer starts, the terminal ...
1 vote
1 answer
872 views

How to use the nohup command properly in a custom script

I have a script that allows me to perform a number of automated tasks. At the end of the script, I run the following command: nohup ./MyServer & This command launches in the background my server ...
1 vote
0 answers
125 views

When i use nohup command..Are nohup exit codes same as script return codes

I am using below command in one script abc. Sh Nohup script1.sh $tablename & This script1.Sh passes some returncodes based on success/fail Ex:0-success 99fail When I use exitstatus=$? .. Will this ...
1 vote
1 answer
187 views

nohup won't show next prompt in SSH session

Assume that I am connected via SSH on a remote Ubuntu system. I want to execute a script there using nohup in case of potential connection drops and redirecting its log to a file. The command I run is ...
  • 259
1 vote
0 answers
96 views

Why is `nohup` necessary

I have to start a rather long duration script (it can run for half an hour or more) through SSH, and collect its StdOut/StdErr and return code. I want to avoid waiting for the process end in the same ...
  • 8,086
0 votes
0 answers
872 views

How to kill a Python process within an SSH session

This question involves running a bash script, say helloworld.sh, which executes an MPI mpirun command which in turn runs a Python program, say helloworld.py, using mpi4py. The bash command is used in ...
  • 259
0 votes
1 answer
269 views

Redirecting breaks output (Python Script)

I am running the same python script multiple times redirecting the output in different ways and getting broken output. Sometimes lines are missing and sometimes the order is reversed. The python ...
-1 votes
1 answer
118 views

Add to script comfirmation for nohup ... & with enter

This is the script.sh: nohup myInnerScript.sh > LOG.log & which I run like this sh script.sh after execution it waits to confirm with enter. How to add the confirmation? Something like this: ...
1 vote
0 answers
223 views

Running script on .xprofile fails to execute

I'm trying to run a login script executing a desktop audio visualizer (glava) on .xprofile but I am running to a few problems: First of all the script (on ~/.local/bin/glav): #! /bin/sh nohup glava --...
0 votes
1 answer
972 views

Why does my process terminate upon log out despite nohup and disown?

I have an executable (a server made with Unity) which I want to continue to run after I log out. All the interwebs say that I should be able to accomplish this with nohup or disown or both. But it ...
0 votes
1 answer
209 views

nohup process not persisting between ssh sessions

I have an ubuntu server on AWS EC2. I can access it, with Putty and ssh, from a Windows 7 laptop. I would like to start a process up during one of these ssh sessions and have it continue after I have ...
0 votes
1 answer
143 views

memory increase after completion of scripts

(I am new user of linux). I am running several matlab scripts in parallel using nohup in this form: (cd Documents/dir_001; nohup matlab -nodisplay -nosplash -nodesktop -r "run('/home/user/...
0 votes
1 answer
8k views

Use crontab to invoke nohup in script

I'm trying to use crontab to check and re-run a long running script. I've created a script that checks the status and runs the long-running script if needed. I'm running the long running script with ...
  • 103
0 votes
1 answer
372 views

When I use nohup and & to run in the background, will there be any effect on my output data?

With the command: nohup python get_seq.py TPH_hits all_genomes_eukaryotes_20200303.fas > TPH_seq2.fasta & nohup: ignoring input and redirecting stderr to stdout Will there be any effect on ...
0 votes
1 answer
254 views

niceness of a background process

Do background process have different nice given? I noticed it is not having the default 0. This might be a problem because it is having less priority.. does anyone know how to change this behavior? I ...
  • 53
2 votes
1 answer
929 views

Without nohup on csh, background job still running after ssh exits

I'm trying to understand the need for using nohup with background commands in ssh. My shell is csh on CentOS. The background command below continues running even after ssh exits. I was expecting this ...
0 votes
1 answer
624 views

How to nohup multiple SAS programs at once?

I have several SAS programs test1_2.sas test3_4.sas test7_8.sas and I hope to nohup those scripts at once. I tried to create a shell wrapper such as a test.sh: #test running multiple files ...
  • 103
1 vote
0 answers
51 views

How to keep a program with several executable keep running after ssh session closed?

I am working from home on VPN and my exceed or Mobaxterm window seems to close itself often. I am losing all the progress of my runs. The program calls for different executables while running also ...
  • 23
0 votes
2 answers
94 views

Using nohup with builtin unix commands with params and file redirection

I would like to run this command: tail -f mylog.log > snippet.log I want to run it in the background and not worry about shell timing out or other problems. This throws warnings and errors: ...
  • 214
0 votes
0 answers
272 views

Why does (nohup'ed) script need to sleep in order for `ps -ef` to work?

In a script that contains the following lines and is called by ansible (via ssh and then sudo), about 4 out of 5 times, I end up in the if branch, although the process I'm trying to ps and grep is ...
3 votes
2 answers
940 views

when to use NOHUP

I would like to know the purpose of nohup these days. I ask because I read this Nohup is short for “No Hangups.” It’s not a command that you run by itself. Nohup is a supplemental command that tells ...
  • 4,512
2 votes
2 answers
720 views

Why doesn't nohup work on a specific process

For what reason(s) would nohup not work on a specific in-house developed process? I'm using it as follows: /usr/bin/nohup process_a & I can close the terminal where it was executed and see ...

1
2 3 4 5 6