How to generate partial checksum of a file
Suppose a more complicated case: You need to get your 2nd 1GB part of your first partition. use dd command:
dd bs=1M skip=1024 count=1024 if=/dev/sda1 | md5sum
Note that we haven't used of=
part of dd
command. So its output will be redirected to standard output, that we piped to the next command.
head -c 1024 | md5sum
should work.
Full example, as requested in comments:
head -c 1024 your_file | md5sum