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