Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Nov 2002 07:26:44 -0800
From:      "Paul A. Scott" <pscott@skycoast.us>
To:        Kent Stewart <kstewart@owt.com>, mike <mike@labs.unixhideout.com>
Cc:        <freebsd-questions@freebsd.org>
Subject:   Re: simple question
Message-ID:  <200211061527.HAA74592@the-frontier.org>
In-Reply-To: <3DC8E440.3060902@owt.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/6/02 1:43 AM, "Kent Stewart" <kstewart@owt.com> wrote:

>> mike wrote:
>> What would i type to
>> make the output of that command not show but at the end simply do let me know
>> its finished? thanks guys
> 
> tar -xzf ports.tar.gz &
> 
> Turn off the verbose and & to background it.
> 
> Kent

That will work unless tar has stderr output (error messages) which might
then cause the tar command to suspend, or cause the error messages to appear
on the screen, depending upon your stty tostop setting.

Also, by turning off the verbose option you won't see the list of files
extracted.

A better way (IMHO) would be to leave the verbose option on, and capture
both stdout and stderr output to a file, while running the whole thing in
background. Then when you're notified that the command completed, you can
peruse the file to see both the list and any errors.

The way to do this depends on the shell you're running.

With 'sh' and its derivatives use:

    tar -xvzf ports.tar.gz >tarlog.txt 2>&1 &

With 'csh' and its derivatives use:

    tar -xvzf ports.tar.gz >& tarlog.txt &

When the background command finishes, all the output will be in "tarlog.txt"

Hope this helps, 

Paul A. Scott
mailto:pscott@skycoast.us
http://skycoast.us/pscott/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211061527.HAA74592>