RE: How many drives?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Quick, and dirty...
>
> fdisk -l | grep '^Disk ' | wc -l
>
> This will fail to report correctly on systems with embedded hardware RAID
> controllers, also mis-counts on systems with software volume management.

This fixes the software volume management issue, only counts "hd" and "sd" devices:



fdisk -l | egrep '^Disk /dev/.*[hs]d' | wc -l

<<winmail.dat>>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux