Operating System - Linux
1752661 Members
6006 Online
108788 Solutions
New Discussion юеВ

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 2
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