Default blocksize for dd

The default I believe is 512 but you can set it with the bs= parameter.
dd if=/dev/zero of=bigfile bs=1M count=100 for instance to use a 1MB blocksize.

Another use of the bs is if you want to read certain bytes out of a file

dd if=some.file bs=1000 skip=1 | head -c 10 ... for instance would extract 10 bytes (head -c 10) from the 1001 byte onwards in file some.file i.e. the blocksize is set to 1000 and skip=1 skips 1 block (1000 bytes) and pipes the rest into head -c 10 that returns just the first 10 bytes.
 
Back
Top