Q:

List all harddrives in a linux system

I'm having problems to detect which one of my block devices is the hard drive. My system has a cd-rom drive, USB drives, and a single hard drive of unknown vendor/type.
How can I identify the hard drive with a linux command, script, or C application?

A:

sudo lshw -class disk

will show you the available disks in the system

A:

As shuttle87 pointed out, there are several other posts that answer this question. The solution that I prefer is: 
root# lsblk -io NAME,TYPE,SIZE,MOUNTPOINT,FSTYPE,MODEL
NAME    TYPE    SIZE MOUNTPOINT FSTYPE            MODEL
sdb     disk    2.7T                              WDC WD30EZRX-00D
`-sdb1  part    2.7T            linux_raid_member 
  `-md0 raid1   2.7T /home      xfs               
sda     disk    1.8T                              ST2000DL003-9VT1
|-sda1  part  196.1M /boot      ext3              
|-sda2  part  980.5M [SWAP]     swap              
|-sda3  part    8.8G /          ext3            
|-sda4  part      1K                              
`-sda5  part    1.8T /samba     xfs               
sdc     disk    2.7T                              WDC WD30EZRX-00D
`-sdc1  part    2.7T            linux_raid_member 
  `-md0 raid1   2.7T /home      xfs               
sr0     rom    1024M                              CDRWDVD DH-48C2S

References:

https://unix.stackexchange.com/q/4561
https://askubuntu.com/q/182446
https://serverfault.com/a/5081/109417

