Date: Mon, 22 Nov 2004 17:34:26 +0100 From: Erik Trulsson <ertr1013@student.uu.se> To: Nikolas Britton <freebsd@nbritton.org> Cc: Martin Hepworth <martinh@solid-state-logic.com> Subject: Re: Job Control Message-ID: <20041122163426.GA99000@falcon.midgard.homeip.net> In-Reply-To: <41A210FD.8060409@nbritton.org> References: <41A1C433.90406@nbritton.org> <41A1C865.30308@solid-state-logic.com> <41A1E04B.9070107@nbritton.org> <20041122142933.GA10428@ei.bzerk.org> <41A210FD.8060409@nbritton.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 22, 2004 at 10:17:01AM -0600, Nikolas Britton wrote: > Ruben de Groot wrote: > > >On Mon, Nov 22, 2004 at 06:49:15AM -0600, Nikolas Britton typed: > > > > > >>I've play a bit with screen but I don't think it will work for my > >>problem so let me restate it. Lets say I wanted to buildworld, build a > >>port, cvsup, portupgrade, etc. but forgot to do it before I left for > >>school, work, or wherever so I ssh into my box and do #foobar& etc. and > >>then exit, then when I get back home I want to see what happened. I > >>guess it just goes to show that there's always a solution to a problem, > >>you just have to look at it from another angle (can you thing of any > >>other solutions btw?): > >> > >> > > > >>From work: > ># nohup foobar >& foobar.log & > > > >Back home: > ># tail -f foobar.log > > > >Ruben > > > > > > > Thanks.... > > # nohup foobar >& foobar.log & > ^^^^ ^^^ > > Why'd you do it like that, how is it diffrent from this way?: > # nohup foobar > foobar.log & His example redirects both stdout and stderr to foobar.log, while yours only redirect stdout. (Note that ">&" is a csh-specific operator. The equivalent for a Bourne-shell derivative would be: nohup foobar > foobar.log 2>&1 & I.e. redirecting stdout to foobar.log and then redirecting file descriptor 2 (stderr) to wherever file descriptor 1 (stdout) goes to (foobar.log in this case.) When used with the nohup command I believe the redirection of stderr is unnecessary since the manpage for nohup(1) says "If standard error is a terminal, it is directed to the same place as the standard output." -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041122163426.GA99000>