[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Assigning a log file to a tty device



nemanuel@student.dei.uc.pt (Nuno Emanuel F. Carvalho) wrote:
> I would like to assign the /var/log/apache/access.log file to the tty8
>console. I know it could be done on syslog.conf file.
> Could someone give an example ?

Try putting a line like:

8:2345:respawn:tail -f /var/log/apache/access.log > /dev/tty8

... into /etc/inittab (removing any other line referring to tty8, of
course), and restarting init with 'telinit q'.

(Putting any kind of filtering on this seems to require a Perl script or
the like; unfortunately, the standard shell-based text utilities do
rather too much buffering to be useful in this context.)

-- 
Colin Watson                                           [cjw44@cam.ac.uk]
Trinity College, Cambridge, and Computer Science         [riva.ucam.org]


Reply to: