hdparm
Get and set SATA and IDE hard drive parameters. tldr-pages
On Linux
Linux
Request the identification info of a given device
sudo hdparm -I /dev/deviceIdentifyGet the Advanced Power Management level
sudo hdparm -B /dev/deviceIdentifySet the Advanced Power Management value (values 1-127 permit spin-down, and values 128-254 do not)
sudo hdparm -B 1 /dev/deviceIdentifyDisplay the device's current power mode status
sudo hdparm -C /dev/deviceIdentifyForce a drive to immediately enter standby mode (usually causes a drive to spin down)
sudo hdparm -y /dev/deviceIdentifyPut the drive into idle (low-power) mode, also setting its standby timeout
sudo hdparm -S standby_timeout deviceIdentifyTest the read speed of a specific device
sudo hdparm -tT deviceIdentify