Have you ever wanted to check the content of the first virtual console without switching to it with "Ctrl+Alt+F1" shortcut from your desktop session? Or the second console of a remote server? Or would you like to send something to the user who is working at the third virtual console (not via wall command)?
The GNU/Linux kernel provides two character devices for such tasks:
- /dev/ttyX - represents X. virtual console
- /dev/vcsX - represents X. virtual console text contents
- cat /dev/vcs1
- ssh root@server 'cat /dev/vcs2'
- echo "something" > /dev/tty3
More information about Linux allocated devices is written in /usr/src/linux/Documentation/devices.txt. You have to have GNU/Linux sources installed.