: bash command help - nohup

Suvayu Ali fatkasuvayu+linux at gmail.com
Fri Oct 30 22:38:34 UTC 2009


Hi Patrick,

Patrick O'Callaghan wrote:
> On Fri, 2009-10-30 at 08:02 -0700, Suvayu Ali wrote:
>>
>> I often find nohup very unreliable. I have had jobs fail submitted with 
>> nohup. I was thinking of switching to using screen. Maybe you could give 
>> that a try?
> 
> Screen is not an option if you want to set up a long-running job and log
> out. In what way has nohup failed on you? It's one of the oldest
> commands in the Shell toolbox and I've never had a problem with it.
> 
> Note that it's often a good idea to run it thus:
> 
> nohup command > OUTPUT 2>&1 &

Whenever I have used nohup I have used it exactly the way you have 
mentioned. And many times I later found out my job had failed when I had 
logged out. Since then I have stopped using nohup and wanted to look 
into screen. Until I do that I just don't log out any more unless I am 
sure my job has finished. Maybe the unreliability I have experienced is 
due to the versions of nohup I use (what ever comes as default with 
Scientific Linux 4, thats way too old).

`screen' on the other hand runs all your jobs independent of your login 
shell, as a post later in the thread has pointed out. It runs on the 
remote machine, and manages the jobs you want to execute. So unless 
screen itself crashes its pretty much safe to say the job will complete 
successfully.

Hopefully this clears up any doubts for you. I should definitely find 
some time to get familiar with screen. :-\

> poc
> 

Cheers,
-- 
Suvayu

Open source is the future. It sets us free.




More information about the fedora-list mailing list