Re: seek within a large file

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 10/17/03


Date: Fri, 17 Oct 2003 00:23:22 -0700

Alan Connor wrote:

< snip >

> So where did you get skip=1048576 then? How did you convert 1GB to that?

The prior poster didn't get 1048576 from either definition of "gigabyte":

http://www.hyperdictionary.com/dictionary/gigabyte

2^20 = 1048576 (the old meaning of "megabyte", and see below), but

one gigabyte = either 10^9 (1,000,000,000) or 2^30 (1,073,741,824).

There are a bunch of ways to get these values in a script, based on
arbitrary input units.

Also see:

$ units gigabyte
        Definition: 1e9 byte = 8e+09 bit

$ units megabyte
       Definition: 1e6 byte = 8000000 bit

These definitions changed only recently.

-- 
Paul Lutus
http://www.arachnoid.com


Relevant Pages

  • Re: seek within a large file
    ... The prior poster didn't get 1048576 from either definition of "gigabyte": ... There are a bunch of ways to get these values in a script, ...
    (comp.os.linux.misc)
  • Re: Socket 939 Matx motherboard ?
    ... GigaByte site for this board and its full-ATX twin, ... Yes, you do get RAID. ... > most boards use a nasty chipset fan. ...
    (uk.comp.homebuilt)
  • Re: Malcolms new book - Chapter 1 review
    ... gigabyte of memory if somebody feeds your program a file with a ... take a stream parameter, so that the function can be used on streams ... * allow the buffer to be re-used (which means taking another pointer to ...
    (comp.lang.c)