Running a command in background?

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

 



On Tue, 18 Jun 2002, Steve Holmes wrote:

> Further thing, Teddy, if you want to be able  to followup and see the
> output of this job later on, you can do something like this; just
> substitute command with the command-line and options of your choosing.
> command >outfile 2>&1 &
> the >outfile redirects all output to the file, outfile and the 2>&1
> forces both stdout and stderr to be captured; the & forces the command
> into background as has been previously mentioned.
>
> If you don't redirect the output this way, you will loos access to any
> output the command has to offer when you logout.

Steve, one of the things that nohup does is creates a file, by default
called nohup.out, which contains any output of the command you're using,
much less hasle imho, I like nohup for those long jobs, if memory serves
it take both stanard out and standard error, so you won't loose a thing.

Cheers.

-- 
Toby Fisher	Email: toby at g0ucu.freeserve.co.uk
Tel.: +44(0)1480 417272	Mobile: +44(0)7974 363239
ICQ: #61744808
   Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html






[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux