You can do this with:
This will tell you hard drive to power down after 20min of inactivity.
I have read in many forums that it only works for IDE drives,
and doesn't work for SATA drives.
Anyway on my machines it works,
And I have drives from Samsung, Western digital and Hitachi.
You can see the status of you drive with:
Code: Select all
hdparm -C /dev/sdc
/dev/sdc:
drive state is: standby
Standby means powered down
active/idle means not being read/write but still spinning.
You can tell you drive to immediately power down with:
One word of advice:
don't use the commands for the drive with the root partition,
or /tmp , /var/tmp , /var/log, ... any of the dirs that are used a lot.
It won't save you power and probably kill your drive in a year or 2.
Read the manual before you use the commands:
http://linux.die.net/man/8/hdparm