Introduction to UNIX: basic concepts
: UNIX design
: the Filesystem
: The UNIX philosophy: Everything is a file
Previous: the Filesystem
Next: Hierarchy
3.4.1. The UNIX philosophy: Everything is a file
Most of the resources are accessible through "special files" in
the filesystem. For example:
/dev/da*, /dev/ad*
-- the hard disks and partitions
/dev/tty*, /dev/pty*
-- terminals and pseudo-terminals
/dev/lpt0
-- the printer
- ...
Other special files:
- named pipes (FIFO): allow communication between processes
- unix sockets: another form of interprocess communication
- links: pointers to other files/directories in the filesystem
The special files above can be manipulated like any other file:
open, read, write, close.
Additionally, some special filesystems exist which contain "virtual"
files - for example, /proc in Linux.
Introduction to UNIX: basic concepts
: UNIX design
: the Filesystem
: The UNIX philosophy: Everything is a file
Previous: the Filesystem
Next: Hierarchy