Devices
You will find it very easy to manipulate devices on a Unix system because the kernel normally presents the device I/O interface to system and user processes as files. Not only can a programmer use regular file operations to work with a device, but some devices are also accessible to standard programs like cat
, so you don't have to be a programmer to use a device. Linux uses the same design of device files as other Unix flavors, but device filenames and functionality vary among flavors.
Linix device files are in the /dev
directory, and running ls /dev
reveals that there are more than a few files in /dev
. So how do you work with devices?
To get started, consider this command:
echo blah blah > /dev/null
Like any command with redirected output, ...
Get How Linux Works now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.