On a Linux desktop (RHEL4) I want to extract a range of bytes (typically less than 1000) from within a large file (>1 Gig). I know the offset into the file and the size of the chunk.
I can write code to do this but is there a command line solution?
Ideally, something like:
magicprogram --offset 102567 --size 253 < input.binary > output.binary
Try
dd:The option
bs=1sets the block size, makingddread and write one byte at a time. The default block size is 512 bytes.The value of
bsalso affects the behavior ofskipandcountsince the numbers inskipandcountare the numbers of blocks thatddwill skip and read/write, respectively.