How to Find Character Special Devices in Ubuntu (find -type c)

The I/O Hardware Mapping

In Ubuntu Linux, almost everything is treated as a file, including physical hardware. While block devices (like hard drives) transfer data in massive chunks, “Character Special Devices” transfer data one character (byte) at a time. These files represent serial ports, mice, keyboards, sound cards, and pseudo-terminals (usually located in the /dev/ directory). If you are writing a script to monitor serial port activity or debugging an unrecognized USB mouse, you must explicitly search the filesystem for character devices.

Using the find Command with -type c

The Linux find command utilizes the -type c flag to exclusively isolate character special device files.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. To search the /dev/ directory and return an exact list of all recognized character-based I/O hardware, type the following command exactly:
  3. find /dev/ -type c
  4. Press Enter.

Input/Output Discovery

The -type c flag acts as a strict hardware filter. It completely ignores standard text files (-type f), directories (-type d), and block storage devices (-type b). It will only return files that represent byte-stream hardware. This command is an absolute necessity for system administrators diagnosing input anomalies, building automated terminal loggers, or configuring permissions on legacy serial ports (like /dev/ttyS0).

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.