28
8
How to do thing like dd if=somefile bs=1 skip=1337 count=31337000
, but efficiently, not using not 1-byte reads and writes?
The solution is expected:
- To be simple (for non-simple I can write some Perl oneliner that will do this)
- To support large offsets and lengths (so hacks with block size in dd won't help)
Partial solution (not simple enough, trying the same with length will make it even more complex):
dd if=somefile bs=1000 skip=1 count=31337 | { dd bs=337 count=1 of=/dev/null; rest_of_pipeline; }
# 1337 div 1000 and 1337 mod 1000
Are you trying to change the blocksize that dd is using? – cmorse – 2012-01-20T21:24:56.923
Changed blocksize => changed units for skip and count – Vi. – 2012-01-20T23:09:40.390