[nylug-talk] Newbie command line question

J. Oquendo sil at infiltrated.net
Sun Dec 9 09:12:23 EST 2007


John Campbell wrote:
> How do I redirect the output of an already running job to something
> other than the terminal?
> 
> For instance I did a large copy operation using "scp".  Then I
> suspended it with "C-k", and resumed it in the background with "bg",
> but the stderr messages appear in the terminal.  Is it possible to
> reroute the error messages while the job is in progress?
> 
> e.g.
> I type this:
> scp -r foo at server.com:~/files/* .
> and what I really want is:
> scp -r foo at server.com:~/files/* 2> errors.txt &
> 

Try using screen before running the command, e.g.:


screen
scp -f foo at server.com:~/files/* >> scp.output &
screen -d

That will show you all the output as if you were on term watching
so it might be a bit too much. Should work though as it will catch
everything.

-- 
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
J. Oquendo
SGFA #579 (FW+VPN v4.1)
SGFE #574 (FW+VPN v4.1)

echo c2lsQGluZmlsdHJhdGVkLm5ldAo=|\
python -c "import sys; print sys.stdin.read().decode('base64')"

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF684C42E



More information about the nylug-talk mailing list