I have read that the
/dev directory contains device files that points to device drivers.
Now my question is, is every single file in the
/dev directory is a device file, or does the
/dev directory contains other types of files?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Typically you may find (b)lock, (c)har, (s)ocket, (l)inks and (d)irectories in
/dev. You can see the type with
ls -l. However, depending on the OS, you may find other files in there. eg on NetBSD there is a shell script
/dev/MAKEDEV, which is meant to help with the creation of these device entries.
As with your other question, it's the type of the file (first character of
ls -l output) that determines if it's a device or not.