* background jobs with nohup and &
@ 2003-10-15 19:24 Shamli
2003-10-15 19:56 ` Robert M. Riches Jr
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Shamli @ 2003-10-15 19:24 UTC (permalink / raw)
I am have a program runs under alfha.
The program sends output to the shell and file.
My problem is that although the program runs in the background and it
still send the output to my shell, and i can not see the nohup.out
file
the server OS is REDHAT 6.10
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: background jobs with nohup and &
2003-10-15 19:24 background jobs with nohup and & Shamli
@ 2003-10-15 19:56 ` Robert M. Riches Jr
2003-10-15 20:26 ` Måns Rullgård
2003-10-16 16:58 ` Michal Jaegermann
2003-10-16 18:16 ` Bill Marcum
2003-10-16 19:09 ` Dave Brown
2 siblings, 2 replies; 6+ messages in thread
From: Robert M. Riches Jr @ 2003-10-15 19:56 UTC (permalink / raw)
In article <5b97e376.0310151124.580fe46a@posting.google.com>, Shamli wrote:
> I am have a program runs under alfha.
> The program sends output to the shell and file.
> My problem is that although the program runs in the background and it
> still send the output to my shell, and i can not see the nohup.out
> file
> the server OS is REDHAT 6.10
At least for RHL 8.0, the nohup info page says it sends
output to a file, but when I ran 'nohup ls' it sent the
output to the xterm from which the command was launched.
Maybe the info page might be inaccurate.
I don't know about alfha.
If you're just trying to run a command in the background
with output sent to a file, why not just do that? I use
C-shell (/bin/csh) and normally do
somecommand < /dev/null >& output.file &
There is some cryptic substitute for '>&' if you're using
bash, but I'm not acquainted with what it is.
For good measure, I often launch the command from an xterm I
created just to launch that one command. After the command
is launched, I terminate the xterm.
Good luck.
Robert Riches
spamtrap42@verizon.net
(Yes, that is one of my email addresses.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: background jobs with nohup and &
2003-10-15 19:56 ` Robert M. Riches Jr
@ 2003-10-15 20:26 ` Måns Rullgård
2003-10-16 16:58 ` Michal Jaegermann
1 sibling, 0 replies; 6+ messages in thread
From: Måns Rullgård @ 2003-10-15 20:26 UTC (permalink / raw)
"Robert M. Riches Jr" <spamtrap42@verizon.net> writes:
> C-shell (/bin/csh) and normally do
>
> somecommand < /dev/null >& output.file &
>
> There is some cryptic substitute for '>&' if you're using
> bash, but I'm not acquainted with what it is.
>& works in bash as well. &> does the same thing.
--
M�ns Rullg�rd
mru@users.sf.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: background jobs with nohup and &
2003-10-15 19:56 ` Robert M. Riches Jr
2003-10-15 20:26 ` Måns Rullgård
@ 2003-10-16 16:58 ` Michal Jaegermann
1 sibling, 0 replies; 6+ messages in thread
From: Michal Jaegermann @ 2003-10-16 16:58 UTC (permalink / raw)
Robert M. Riches Jr <spamtrap42@verizon.net> wrote:
> In article <5b97e376.0310151124.580fe46a@posting.google.com>, Shamli wrote:
>> I am have a program runs under alfha.
>
> At least for RHL 8.0, the nohup info page says it sends
> output to a file, but when I ran 'nohup ls' it sent the
> output to the xterm from which the command was launched.
That way your stdio is attached to a terminal you happen to
be using so this is not a big surprise
> Maybe the info page might be inaccurate.
Maybe not the most clear. Here what is says among other things:
`nohup' does not automatically put the command it runs in the
background; you must do that explicitly, by ending the command line
with an `&'.
There is really no point of running nohup jobs in a foreground as
this is not doing anything really exciting. Also jobs running from
'cron' or 'at' really do not have "backgroud" so using nohup there
does not make much sense either (by default stdout and stderr to
of such jobs is piped to some mail user agent, a.k.a. MUA) so nohup
is really for an interactive use.
Try 'nohup ls &' and see what will happen. :-) You can indeed
redirect output of these commands to some other file than 'nohup.out'
but you will have to do that explicitely.
Michal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: background jobs with nohup and &
2003-10-15 19:24 background jobs with nohup and & Shamli
2003-10-15 19:56 ` Robert M. Riches Jr
@ 2003-10-16 18:16 ` Bill Marcum
2003-10-16 19:09 ` Dave Brown
2 siblings, 0 replies; 6+ messages in thread
From: Bill Marcum @ 2003-10-16 18:16 UTC (permalink / raw)
On 15 Oct 2003 12:24:50 -0700, Shamli
<ashamli@hotmail.com> wrote:
> I am have a program runs under alfha.
> The program sends output to the shell and file.
> My problem is that although the program runs in the background and it
> still send the output to my shell, and i can not see the nohup.out
> file
nohup program 2>&1 &
--
Cheops' Law:
Nothing ever gets built on schedule or within budget.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: background jobs with nohup and &
2003-10-15 19:24 background jobs with nohup and & Shamli
2003-10-15 19:56 ` Robert M. Riches Jr
2003-10-16 18:16 ` Bill Marcum
@ 2003-10-16 19:09 ` Dave Brown
2 siblings, 0 replies; 6+ messages in thread
From: Dave Brown @ 2003-10-16 19:09 UTC (permalink / raw)
In article <5b97e376.0310151124.580fe46a@posting.google.com>, Shamli wrote:
> I am have a program runs under alfha.
> The program sends output to the shell and file.
> My problem is that although the program runs in the background and it
> still send the output to my shell, and i can not see the nohup.out
> file
> the server OS is REDHAT 6.10
It's difficult to guess the answer without seeing exactly what you are
doing: "send output to the shell and file"--how?
The nohup.out file only gets created if the output of the 'nohupped'
command in not redirected.
--
Dave Brown Austin, TX
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-16 19:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-15 19:24 background jobs with nohup and & Shamli
2003-10-15 19:56 ` Robert M. Riches Jr
2003-10-15 20:26 ` Måns Rullgård
2003-10-16 16:58 ` Michal Jaegermann
2003-10-16 18:16 ` Bill Marcum
2003-10-16 19:09 ` Dave Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox