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 t
head -c + tail -c
head -c
tail -c
Not sure how it compare to dd in efficiency, but it is fun:
dd
printf "123456789" | tail -c+2 | head -c3
picks 3 bytes, starting at the 2nd one:
234
See also: https://stackoverflow.com/a/1272995/895245