Device files U NIX has a beautifully consistent method of allowing programs to access hardware. Under U NIX , every piece of hardware is a file. When you read from it, you are actually reading directly from the first physical hard disk of your machine.
Device files allow access to hardware.
This is an easy way to see if your mouse is working. On occasion this test doesn't work if some command has previously configured the serial port in some odd way. Block and character devices Hardware devices can generally be categorised into random access devices like disk and tape drives, and serial devices like mouses, sound cards and terminals. Random access devices are usually accessed in large contiguous blocks of data that are stored persistently. These are known as block devices.