Determining from the name which device special file corresponds to which physical device is not always straightforward. For disk drives,
several sets of conventions are fairly common. Rather than trying to spell out rules, the following table presents some examples from which the general principles can be deduced:
UNIX version | Filename | Device |
Linux | /dev/hda1 | hd=IDE disk drive; a=first drive on system; 1=partition number |
| /dev/sdb4 | sd=SCSI disk drive; b=second drive on system; 4=partition number |
SunOS | /dev/sd1c | sd=SCSI drive; 1=device number on controller; c=partition |
System V (Solaris, HP-UX) | /dev/dsk/c0d2s3 | SCSI controller 0, device number 2, partition 3 |
| /dev/dsk/c0t0d3s2 | SCSI controller 0, LUN 0, device 3, partition 2 |
| /dev/rdsk/c0d3s2 | SCSI controller 0, device 3, partition 2 (raw device access) |
In addition, systems other than Linux provide a parallel set of device special files for "raw" device access. Raw devices can be read block by block, like a tape drive or other unformatted device. This capability is used by backup programs or other programs that must manipulate the disk at a low level. These files are usually marked with an
r
somewhere in the name.