bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nohup feature request / Please fwd to Jim Meyering


From: Phillip Susi
Subject: Re: nohup feature request / Please fwd to Jim Meyering
Date: Thu, 07 Jun 2007 14:38:10 -0400
User-agent: Thunderbird 1.5.0.12 (Windows/20070509)

Pádraig Brady wrote:
My request is: could the output be preceded by
1) the name/PID of the process that produces the output.

That's not possible unfortunately, as nohup just
sets things up, and replaces itself with the command.
It might suffice to have separate files for each command,
which you can specify by using redirection:

Of course it is possible; nohup knows its pid as well as the command it is asked to run. When it opens the output file it just needs to use that information to name it.

nohup nice command1 >command1.out&
nohup nice command2 >command2.out&

This works too.

Personally I much prefer using screen to nohup:
http://www.pixelbeat.org/docs/screen/

Screen is nice for interactive commands that you want to come back to later. For things that you just want to run in the background and forget about, I find the batch command to be very useful. Works similar to nohup but instead of having to check an output file for the results later and check ps to see if the command is still running, you get the results in an email when it is finished.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]