From owner-freebsd-questions Thu Mar 30 12:44: 5 2000 Delivered-To: freebsd-questions@freebsd.org Received: from eagle.prod.itd.earthlink.net (eagle.prod.itd.earthlink.net [207.217.120.24]) by hub.freebsd.org (Postfix) with ESMTP id 1E20F37B93F for ; Thu, 30 Mar 2000 12:44:03 -0800 (PST) (envelope-from bduk@earthlink.net) Received: from earthlink.net (sdn-ar-006orportP234.dialsprint.net [63.178.66.250]) by eagle.prod.itd.earthlink.net (8.9.3/8.9.3) with ESMTP id MAA14693; Thu, 30 Mar 2000 12:44:00 -0800 (PST) Received: (from bduk@localhost) by earthlink.net (8.9.3/8.9.3) id MAA00360; Thu, 30 Mar 2000 12:43:32 -0800 (PST) (envelope-from bduk) Date: Thu, 30 Mar 2000 12:43:32 -0800 (PST) Posted-Date: Thu, 30 Mar 2000 12:43:32 -0800 (PST) Message-Id: <200003302043.MAA00360@earthlink.net> From: Derrick Baumer To: suckworldcreator@hotmail.com Cc: freebsd-questions@FreeBSD.ORG In-reply-to: <20000330195324.59712.qmail@hotmail.com> (suckworldcreator@hotmail.com) Subject: Re: using & commands Reply-To: bduk@earthlink.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: "Sarah Li" > > To whom it may concern: > > I am currently doing a project on Free BSD and I have a few > questions. The first one is what is the & along with a command used > for? It runs the program in the background... > and what does it mean by putting it into the background? ...which means it starts running, but it frees your terminal up to do other things. For example, if I want to send mail mail out, I would type 'sendmail -q', then wait for 30 seconds or so while it did its job, then it'd finish and I'd have my prompt back so I could continue working. (Run-on sentence from hell there, eh?) Instead, I can type 'sendmail -q &' and it will immediately give my control back to do other things while it runs in the background. > also, how would you stop a background task that has gone beserk? Then, if I suddenly decided I wanted to stop sendmail from finishing its job, I would type 'fg'. That will bring the program back to the foreground so I could stop it. If you have multiple jobs in the background, typing 'fg' will just bring the last one up. To bring a specific one up, you need to type 'fc -l', which will list all of the background processes you have running. The first column is the background job number. If I wanted to bring job 3 up, I would type 'fg 3'. Hope that helped. -- Derrick Baumer - Black Duck Software To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message