You can safely unmount and spin-down an external hard disk from the terminal most easily by using the command-line functionality of
udisks, which does not require the use of sudo if your system is set up correctly. (To list your device names, enter
mount in the terminal first.)
When you have found your external drive, use the following commands. You must first unmount the partition (use
sdb1 or whatever
mount showed as the location):
udisks --unmount /dev/sdb1
Then to safely remove (i.e. spindown- you will hear it click and spin-down), use only
sdb, for example:
udisks --detach /dev/sdb
NOTE: It is of crucial importance here that you use
sdc without a partition number when using the
detach option; i.e.
sdc1 will not work. The partition must be unmounted first and then the disk itself spun down as the examples show.
udisks commands work successfully for all my pata and sata external hard disks.