Skip to main content
added 152 characters in body
Source Link
frostschutz
  • 52.2k
  • 7
  • 129
  • 179

GNU dd supports count_bytes, seek_bytes, skip_bytes flags. This allows you to use a performant blocksize choice with arbitrary offsets and sizes.

GNU dd since version 9.1 does this by default if you specify a byte unit.

Quoting from coreutils/NEWS:

dd now counts bytes instead of blocks if a block count ends in "B". For example, 'dd count=100KiB' now copies 100 KiB of data, not 102,400 blocks of data. The flags count_bytes, skip_bytes and seek_bytes are therefore obsolescent and are no longer documented, though they still work.

Another option is to create a loop device with the desired offset and size limits. That works for dd (or any other program) that does not support arbitrary offsets by itself.

Alternatively you could also consider copying only the partial first/last block with bs=1 and the middle segment with your desired larger blocksize.

GNU dd supports count_bytes, seek_bytes, skip_bytes flags. This allows you to use a performant blocksize choice with arbitrary offsets and sizes.

GNU dd since version 9.1 does this by default if you specify a byte unit.

Quoting from coreutils/NEWS:

dd now counts bytes instead of blocks if a block count ends in "B". For example, 'dd count=100KiB' now copies 100 KiB of data, not 102,400 blocks of data. The flags count_bytes, skip_bytes and seek_bytes are therefore obsolescent and are no longer documented, though they still work.

Another option is to create a loop device with the desired offset and size limits. That works for dd (or any other program) that does not support arbitrary offsets by itself.

GNU dd supports count_bytes, seek_bytes, skip_bytes flags. This allows you to use a performant blocksize choice with arbitrary offsets and sizes.

GNU dd since version 9.1 does this by default if you specify a byte unit.

Quoting from coreutils/NEWS:

dd now counts bytes instead of blocks if a block count ends in "B". For example, 'dd count=100KiB' now copies 100 KiB of data, not 102,400 blocks of data. The flags count_bytes, skip_bytes and seek_bytes are therefore obsolescent and are no longer documented, though they still work.

Another option is to create a loop device with the desired offset and size limits. That works for dd (or any other program) that does not support arbitrary offsets by itself.

Alternatively you could also consider copying only the partial first/last block with bs=1 and the middle segment with your desired larger blocksize.

Source Link
frostschutz
  • 52.2k
  • 7
  • 129
  • 179

GNU dd supports count_bytes, seek_bytes, skip_bytes flags. This allows you to use a performant blocksize choice with arbitrary offsets and sizes.

GNU dd since version 9.1 does this by default if you specify a byte unit.

Quoting from coreutils/NEWS:

dd now counts bytes instead of blocks if a block count ends in "B". For example, 'dd count=100KiB' now copies 100 KiB of data, not 102,400 blocks of data. The flags count_bytes, skip_bytes and seek_bytes are therefore obsolescent and are no longer documented, though they still work.

Another option is to create a loop device with the desired offset and size limits. That works for dd (or any other program) that does not support arbitrary offsets by itself.