A command that tells the name of the current HDD
Hi all! :)
I want to make a program that runs some tests, and one of them is "hdparm -tT /dev/hda". But it can be /dev/hdb or /dev/sda or ... and so on. I want to run this benchmark on the current HDD, so I need a command that returns the name of the hard this, it is ran on. For example, when I run "whoami", it returns "shiro" (current user). I want to run "this_command" and I want it to return "/dev/hda" (current drive). I will use popen() to catch the string, that the command returns and everything's OK.
If there isn't such command, please say some alternatives. 10x in advance!