Dd

From Leo's Notes
Revision as of 17:01, 10 April 2017 by Leo (talk | contribs) (Created page with " == Manipulating by Bytes == Use the {{code|iflag=skip_bytes,count_bytes}} flags when working with data in bytes. The {{code|bs}} block size value will be ignored when these f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 10 April 2017, at 17:01.

Manipulating by Bytes

Use the {{{1}}} flags when working with data in bytes. The bs block size value will be ignored when these flags are used.

Question: When using the count_bytes flag, is this equivalent to {{{1}}}?

Offset / Skipping Bytes

If you need to extract a chunk of data, say everything past byte 199232000 from a file:

$ dd if=blah.dat iflag=skip_bytes,count_bytes skip=199232000

To get only 200 bytes of data instead:

$ dd if=blah.dat iflag=skip_bytes,count_bytes skip=199232000 count=200

Or 2 kilobytes (2048 bytes):

$ dd if=blah.dat iflag=skip_bytes,count_bytes skip=199232000 count=2k