home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / perl / 6892 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.9 KB  |  53 lines

  1. Path: sparky!uunet!usc!cs.utexas.edu!torn!nott!cunews!revcan!ecicrl!clewis
  2. From: clewis@ferret.ocunix.on.ca (Chris Lewis)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: stat(2) on ISC and "stat"new "stat" program
  5. Message-ID: <3957@ecicrl.ocunix.on.ca>
  6. Date: 7 Nov 92 08:55:38 GMT
  7. References: <1992Nov6.223732.9010@xyzoom.info.com>
  8. Organization: Elegant Communications Inc., Ottawa, Canada
  9. Lines: 42
  10.  
  11. In article <1992Nov6.223732.9010@xyzoom.info.com> rob@xyzoom.info.com (Rob Lingelbach) writes:
  12. |Using Tim Wilson's perl script "stat" to provide user-access to
  13. |stat(2), I find that on my Unix there are "0"'s (zeroes) in the fields
  14. |for blocks and blksize, as follows:
  15.  
  16. |/usr/rob/.mushrc
  17. |    device        0x3
  18. |    inode        948        0x3b4
  19. |    mode        -rw-r--r--    0100644
  20. |    nlink        1
  21. |    owner        rob
  22. |    group        other
  23. |    rdev        0
  24. |    size        2042
  25. |    atime        Fri Nov  6 14:30:16 PST 1992
  26. |    mtime        Mon Oct 26 20:56:13 PST 1992
  27. |    ctime        Mon Oct 26 20:56:13 PST 1992
  28. |    blksize        0
  29. |    blocks        0
  30.  
  31. |Tim hasn't heard of this behavior, and we were wondering if it is
  32. |specific to something "missing" from ISC's stat(2).  Can anyone tell
  33. |me what's wrong here?  OS is ISC 3.0.
  34.  
  35. System V stat() doesn't support blksize or blocks.  These are
  36. (usually) part of the Berkeley Fast File System (and other newer
  37. file system formats).
  38.  
  39. In ISC, which is supposed to support FFS optionally (I think). the
  40. struct members may be there in <stat.h>, but the file is on an
  41. ordinary System V partition and the numbers are unavailable.
  42. Or, it could be that these entries simply aren't there at all,
  43. and Tim's program doesn't take into account a shorter stat structure
  44. than he's used to.
  45.  
  46. This is why "ls -s" of a file is usually wrong on a System V machine
  47. and you're looking at a file with holes.  It'll just be the file
  48. size divided by the block size (or hardcoded 512).
  49. -- 
  50. Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
  51. Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
  52. Ferret list: ferret-request@ferret.ocunix.on.ca
  53.