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