From owner-freebsd-questions@FreeBSD.ORG Mon Nov 22 16:34:31 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 206E116A4CE for ; Mon, 22 Nov 2004 16:34:31 +0000 (GMT) Received: from av15-1-sn4.m-sp.skanova.net (av15-1-sn4.m-sp.skanova.net [81.228.10.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CF0743D39 for ; Mon, 22 Nov 2004 16:34:29 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av15-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 6692A37E4E; Mon, 22 Nov 2004 17:34:28 +0100 (CET) Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av15-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 4EDC037E42 for ; Mon, 22 Nov 2004 17:34:28 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with SMTP id AF1B737E42 for ; Mon, 22 Nov 2004 17:34:27 +0100 (CET) Received: (qmail 99044 invoked by uid 1001); 22 Nov 2004 16:34:26 -0000 Date: Mon, 22 Nov 2004 17:34:26 +0100 From: Erik Trulsson To: Nikolas Britton Message-ID: <20041122163426.GA99000@falcon.midgard.homeip.net> Mail-Followup-To: Nikolas Britton , Ruben de Groot , freebsd-questions , Martin Hepworth References: <41A1C433.90406@nbritton.org> <41A1C865.30308@solid-state-logic.com> <41A1E04B.9070107@nbritton.org> <20041122142933.GA10428@ei.bzerk.org> <41A210FD.8060409@nbritton.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41A210FD.8060409@nbritton.org> User-Agent: Mutt/1.5.6i cc: Ruben de Groot cc: freebsd-questions cc: Martin Hepworth Subject: Re: Job Control X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 16:34:31 -0000 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." -- Erik Trulsson ertr1013@student.uu.se