Skip site navigation (1)Skip section navigation (2)
Date:      06 Nov 2002 12:29:26 -0800
From:      swear@attbi.com (Gary W. Swearingen)
To:        mike <mike@labs.unixhideout.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: simple question
Message-ID:  <smznsmo315.nsm@localhost.localdomain>
In-Reply-To: <200211060747.gA67likv053196@labs.unixhideout.com>
References:  <200211060747.gA67likv053196@labs.unixhideout.com>

next in thread | previous in thread | raw e-mail | index | archive | help
mike <mike@labs.unixhideout.com> writes:

> Hello all, The easiest way of going about this is giving you a example. I am in /usr and i want to tar -xzvf ports.tar.gz, but i want to continue working in my shell while this process runs in the background. 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

(Please format your messages better.  70-char width is nice.)

When using X, try:
    xterm -iconic -hold -e sh -c "tar xzvf ports.tar.gz; echo '
    *** tar is complete; iconified ***' | write $(whoami) $(tty)"&
or:
    xterm -iconic -hold -e sh -c "tar xzvf ports.tar.gz; xmessage '
    *** tar is complete; iconified ***'"&

(Unless you can remember that sort of thing, you'll want to rewrite it
as a script, allowing "ports.tar.gz", etc, to be script arguments.)

There's a way to run a command in another virtual terminal, but
I've forgotten it.

A better plan might be to learn "script"; it allows you to switch
between multiple shell sessions within one VT or xterm.  You should be
able to use "write" or "xmessage" to get notice of your completed tar.

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?smznsmo315.nsm>