Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any software which can be used to read content of usb byte by byte ? I am using ubuntu 13.10. I am doing this for checksum purpose. I need to calculate checksum of first 950 MB, usb is of 4gb.

share|improve this question

closed as off-topic by random May 25 at 18:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – random
If this question can be reworded to fit the rules in the help center, please edit the question.

Checksum ? why not just use md5 for example ? –  Lawrence Mar 11 at 7:39
What are you really trying to do? Instead of asking for "a software to do XYZ", try asking how to achieve what you need, and show us what you've already tried. –  slhck Mar 11 at 7:48
edited to answer your issues –  aks Mar 11 at 8:09
USB drive, I assume? Reading the first 950 MB of mouse input might require quite a bit of scrolling, and 950 MB of keyboard input will give you Carpal Tunnel Syndrome. –  MSalters Mar 11 at 12:47

1 Answer 1

up vote 10 down vote accepted

You can use dd to do a disk dump, i.e. dumping the disk byte-by-byte. Feed it to md5sum afterwards to compute the checksum.

dd if=/dev/sdb1 bs=1M count=950 | md5sum

where if means where to read from; /dev/sdb1 is your USB device; bs indicates Block Size or how much dd is going to read at a time and 1M means 1024*1024 bytes; count means how many blocks to read.

share|improve this answer
what if i have to do the checksum on first 950 MB ? –  aks Mar 11 at 8:08
bs=1048576 count=950 –  David Schwartz Mar 11 at 8:11
bs indicates Block Size i.e. number of bytes to be read at a time. count means how many blocks to be read in total. Therefore bs=1048576 count=950 suggested by @DavidSchwartz means "read 1MB at a time, repeat 950 times" –  Kenneth L Mar 11 at 8:24
for any linux commands you can always add --help to find out its function, or read man pages –  Lưu Vĩnh Phúc Mar 11 at 8:29
@aks dd has skip_bytes. Read the documentation. –  David Schwartz Mar 11 at 9:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.