To install Blockdev in OSX?
If you want to get the size of a mounted block device (which is what blockdev -getsize64 does), you can use the following:

diskutil information &lt;device&gt; | grep "Total Size" | sed -e 's/[^(]*(([^Bytes)]*\).*/\1/'


If you want to do the same for a file, you can use the following (amongst many others):

stat -f '%z' &lt;filename&gt;