home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!lwvanels
- From: lwvanels@athena.mit.edu (Lucien W. Van Elsen)
- Subject: Re: stat.pl query
- In-Reply-To: stuart@ds3100.new.dec.com's message of Tue, 28 Jul 1992 17:13:17 GMT
- Message-ID: <LWVANELS.92Jul28145102@fionavar.mit.edu>
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: fionavar.mit.edu
- Reply-To: lwvanels@MIT.EDU
- Organization: Massachusetts Institute of Technology
- References: <1992Jul28.171317.22804@rdg.dec.com>
- Date: Tue, 28 Jul 1992 18:51:10 GMT
- Lines: 21
-
- stuart@ds3100.new.dec.com (Stuart Broderick) writes:
- > When this runs, I get
- >
- > st_mode st_uid st_gid
- > 33224 1103 100
- >
- > When I do a "ls -lag ./test", I get
- >
- > -rwx--x--- 1 stuart espo 286720 Jul 28 17:56 ./test
- >
- > The username and group are correct (st_uid, st_gid), but what does
- > st_mode relate to ?
- > I expected it to give 0710.
-
- A couple things should clear this up- First, the st_mode field gives more
- than just the file protection; it also contains the type of the file.
- Additionally, st_mode is returned in decimal. 33224 is 0100710 in octal;
- according to /usr/include/sys/stat.h under Ultrix, _S_IFREG is 0100000. So,
- the file you stat'd is a regular file with the protections you expected.
-
- -Lucien
-