tags:

views:

66

answers:

2

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
+6  A: 

dd skip=102567 count=253 if=input.binary of=output.binary bs=1

Thomas Padron-McCarthy
Thanks. Exactly what I wanted.
DanM
+1  A: 

The dd command can do all of this. Look at the seek and/or skip parameters as part of the call.

Joe