From the Terminal, run first this command to display all mounted drives:
sudo fdisk -l
If for example we want to test read speed of your hard drive, then issue this command:
sudo hdparm -t /dev/sda1
Replace /dev/sda1 with the mounted drive name as displayed in the list of partitions (/dev/sda1,/dev/sda2, /dev/sda3, etc.). Here is the output I have got for my hard drive:
Timing buffered disk reads: 272 MB in 3.01 seconds = 90.38 MB/sec
My hard drive has read speed of 90.38 MB/sec.
To check for example read speed of your mounted USB flash drive, then run this command (Replace /dev/sdb1 with the drive name assigned to your USB drive):
sudo hdparm -t /dev/sdb1
Here is the output I have obtained:
Timing buffered disk reads: 62 MB in 3.06 seconds = 20.23 MB/sec
My USB flash drive has read speed of 20.23 MB/sec.
Note: this tip is tested under Ubuntu 11.04/10.10/10.04.