Marcos Marconcini wrote:
> Hi,
> 
>  
> 
>  I am trying to extract a portion of a large file, to do a sha1 check, it's
> greater than 2.7Gb. I was reading help for head command, but it's only
> permit me put number of lines to extract, and I need to extract the portion
> of 1.5Gb in bytes, and generate a new file. Is this posible? How can I do ?
> I am using openbsd 3.6. Any help are welcome!!!

Here's how I extract individual messages out of (large) mbox files:

tail -c +${2} ${1} |head -${3}

?

That jumps to the byte offset $2 and displays the next $3 lines of file $1.

BTW: make your files smaller than that if you can.  Multi-GB text files
work, but they are often unpleasantly slow to do anything with.

As usual...lots of ways to do most things.
(of course, most are wrong.  The above is probably an example of that :)

Nick.

Reply via email to