I have configured rsyslog
to log certain log events to /dev/xconsole
:
*.*;cron.!=info;mail.!=info |/dev/xconsole
/dev/xconsole
is a named pipe (fifo
). If I want to see what is being logged, I can do cat /dev/xconsole
. I am surprised to see, that the command cat /dev/xconsole
does not finish after reading the file, but instead acts as tail -f
. in other words, the two commands behave the same:
cat /dev/xconsole
tail -f /dev/xconsole
Can somebody please explain why is that?
Is there any difference between the two?
world
, and, lo, "world" appears in the other terminal. – Michael Homer Jul 08 '17 at 03:34tail -f
will keep going..." Is it because contrary tocat
,tail -f
will ignore EOF conditions and will only stop permanently when one entersCtrl
+C
(i.e. when receiving an interrupt signal)? – The Quark Nov 01 '21 at 08:59