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.
- Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
- 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: find /dev/ -type b- 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.