How to Find Block Device Files in Ubuntu (find -type b)

The Hardware Mapping Audit

In Ubuntu Linux, “everything is a file.” Hardware devices, including hard drives and USB storage arrays, are represented on the filesystem as special structures called “block device files” (typically located inside the /dev/ directory). Unlike character devices (like mice or keyboards) that stream data byte-by-byte, block devices read and write data in massive, buffered chunks. If you are writing a custom backup script or attempting to mount an unlisted storage array, you must explicitly search the filesystem for these specific hardware endpoints.

Using the find Command with -type b

The Linux find command utilizes the -type b flag to exclusively isolate block device files representing physical storage hardware.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. To scan the /dev/ directory and return an exact list of every single connected hard drive, NVMe SSD, or USB block device, type the following command exactly:
  3. find /dev/ -type b
  4. Press Enter.

Storage Forensics

The -type b flag acts as a strict structural filter. It completely ignores standard directories, symlinks, and streaming character devices (-type c). It will only return files that the Linux kernel has mathematically identified as block-based storage hardware. This command is an absolute necessity for system administrators attempting to diagnose missing NVMe drives (e.g., locating /dev/nvme0n1) or auditing a server for rogue, unauthorized USB mass storage devices that have been physically plugged into the machine.

Get the best tech tips delivered straight to your inbox.

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