ls -la /dev/tty shows the output:
crw-rw-rw- 1 root tty 5, 0 Dec 14 22:21 /dev/tty
What does c at the beginning mean? When I do something like pwd > /dev/tty it prints to the stdout. What does the file /dev/tty contain?
Join Stack Overflow to learn, share knowledge, and build your career.
|
What does c at the beginning mean? When I do something like |
|||
closed as off-topic by Corey Ogburn, Trinimon, Heikki, Mark Hildreth, DuckMaestro Dec 23 '13 at 22:22This question appears to be off-topic. The users who voted to close gave this specific reason:
|
|||
|
|
|||
|
The 'c' means it's a character device. tty is a special file representing the 'controlling terminal' for the current process. Character Devices Unix supports 'device files', which aren't really files at all, but file-like access points to hardware devices. A 'character' device is one which is interfaced byte-by-byte (as opposed to buffered IO). TTY /dev/tty is a special file, representing the terminal for the current process. So, when you
This quote is from http://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html#ss7.3 :
Here is the man page: http://linux.die.net/man/4/tty |
||||
|
|
|
Incidentally, You can also read from |
|||||||||||||||||||||
|
|
The 'c' means it's a character special file. |
||||
|
|