blockdev - query block devices
$ blockdev [options] <device>
The blockdev
command call ioctls on the given block device.
-s
, --size
: Get disk size in bytes-b
, --block-size
: Get block size in bytes# Get disk size
# blockdev -s /dev/hda
863718912
# Get block size
# blockdev -b /dev/hda
512