Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #37226

Re: Int64 File Seeking ???

Subject Re: Int64 File Seeking ???
Newsgroups comp.os.linux.misc
References <Uh2cnczb7I4tJmj-nZ2dnZfqnPWdnZ2d@earthlink.com> <wwvh6vegjtw.fsf@LkoBDZeT.terraraq.uk>
From "25B.E866" <25B.E866@noaaba.net>
Organization protonic seahorse
Date 2023-02-22 10:14 -0500
Message-ID <zyednetK5uXprGv-nZ2dnZfqn_ednZ2d@earthlink.com> (permalink)

Show all headers | View raw


On 2/22/23 3:55 AM, Richard Kettlewell wrote:
> "25B.E866" <25B.E866@noaaba.net> writes:
>> I arrived at a need to search hard drives - like
>> up to 16 terabyte hard drives - AND kinda show what's
>> going on. THE problem is that if you need to look at
>> a SPECIFIC spot on the disk the usual "seek()"
>> functions crap out - limited to longint (about 2.4
>> gig). Free Pascal CLAIMS its fseek() will take an
>> int64 ... but in practice I see the exact same bits
>> of the disk come up again, which means it's rolling
>> over. Just started experimenting with Python - I'll
>> know in a day or two.
> 
> In Python 3, file offsets use the int type, which can be as big as you
> like.

   That's what it looked like at first brush yesterday.
   Now my Lazarus GUI has to call a Python3 helper pgm
   to do the seeks and create a file-o-binary form
   consumption.

>> The GCC lib - sometimes requiring special flags -
>> claims it'll do 64-bit seeks - but I haven't
>> confirmed that yet either.
> 
> In C, on a 64-bit Linux platform, all of lseek, fseek and fseeko will
> use 64-bit offsets (since long and off_t are both 64 bits on such
> platforms).
> 
> https://man7.org/linux/man-pages/man2/lseek.2.html
> https://man7.org/linux/man-pages/man3/fseek.3.html
> https://man7.org/linux/man-pages/man3/ftello.3.html

   Trying to search it I kept running into odd flags
   and pragmas and such that might need to be added
   to make sure it was using 64-bits. At the rate
   things are going they might just wanna bite it
   and go to 128-bit values for all their file stuff.

   In any case I'll re-do the helper pgm in 'C' today
   and experiment. Python is a bit weird with binary
   (not TOO bad in this specific case) but 'C' is
   always happy.

> If you have 32-bit platform still, you have a couple of options, but the
> sensible one is: bin it and get a computer that hasn’t been obsolete for
> the last 15 years.

   There isn't much that ain't 64 bit these days.

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Int64 File Seeking ??? "25B.E866" <25B.E866@noaaba.net> - 2023-02-22 01:52 -0500
  Re: Int64 File Seeking ??? Richard Kettlewell <invalid@invalid.invalid> - 2023-02-22 08:55 +0000
    Re: Int64 File Seeking ??? The Natural Philosopher <tnp@invalid.invalid> - 2023-02-22 13:38 +0000
      Re: Int64 File Seeking ??? Richard Kettlewell <invalid@invalid.invalid> - 2023-02-22 14:11 +0000
        Re: Int64 File Seeking ??? "25B.E866" <25B.E866@noaaba.net> - 2023-02-22 20:38 -0500
      Re: Int64 File Seeking ??? "25B.E866" <25B.E866@noaaba.net> - 2023-02-22 23:53 -0500
        Re: Int64 File Seeking ??? Robert Riches <spamtrap42@jacob21819.net> - 2023-02-23 05:11 +0000
          Re: Int64 File Seeking ??? Bobbie Sellers <bliss@mouse-potato.com> - 2023-02-22 21:29 -0800
          Re: Int64 File Seeking ??? "25B.E866" <25B.E866@noaaba.net> - 2023-02-23 00:49 -0500
            Re: Int64 File Seeking ??? The Natural Philosopher <tnp@invalid.invalid> - 2023-02-24 13:13 +0000
              Re: Int64 File Seeking ??? Richard Kettlewell <invalid@invalid.invalid> - 2023-02-24 14:58 +0000
              Re: Int64 File Seeking ??? Pancho <Pancho.Jones@proton.me> - 2023-02-24 15:13 +0000
                Re: Int64 File Seeking ??? "25A.I866" <25A.I866@noacba.net> - 2023-02-26 00:05 -0500
              Re: Int64 File Seeking ??? "25A.I866" <25A.I866@noacba.net> - 2023-02-25 23:58 -0500
    Re: Int64 File Seeking ??? "25B.E866" <25B.E866@noaaba.net> - 2023-02-22 10:14 -0500
      Re: Int64 File Seeking ??? Bobbie Sellers <bliss@mouse-potato.com> - 2023-02-22 08:52 -0800
        Re: Int64 File Seeking ??? The Natural Philosopher <tnp@invalid.invalid> - 2023-02-22 16:55 +0000
        Re: Int64 File Seeking ??? Bobbie Sellers <bliss@mouse-potato.com> - 2023-02-22 12:36 -0800
  Re: Int64 File Seeking ??? "Carlos E.R." <robin_listas@es.invalid> - 2023-02-24 20:50 +0100

csiph-web