Linux下判断磁盘是SSD还是HDD的几种方法
# cat /sys/block/*/queue/rotationalYou should get 1 for hard disks and 0 for a SSD.It will probably not work if your disk is a logical device emulated by hardware (like a RAID controller).通过判断cat /sys/block//queue/rotational的返回值(其中为你的硬盘设备名称,例如sda等等)