Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

how to redirect messages to ttyX and also to a file

SOLVED
Go to solution
Maaz
Valued Contributor

how to redirect messages to ttyX and also to a file

I am redirecting the console messages of a daemon to tty9
# /opt/ibm/lotus/bin/server > /dev/tty9

I want to redirect the console messages to /dev/tty9 and also to a file(/var/log/domino_cm.log)

Regards
Maaz


2 REPLIES
Goran Koruga
Honored Contributor

Re: how to redirect messages to ttyX and also to a file

Use tee to redirect to multiple targets.

Goran
Matti_Kurkela
Honored Contributor
Solution

Re: how to redirect messages to ttyX and also to a file

Goran is correct.

Syntax:

# /opt/ibm/lotus/bin/server | tee /var/log/domino_cm.log > /dev/tty9

MK
MK