Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

access(3F)

perror(3F)

time(3F)

STAT(3F)

+U77 FORTRAN compile-line option required

NAME

stat, lstat, fstat − get file status

SYNOPSIS

INTEGER*4 function stat (name, statb)
character*(*) name
INTEGER*4 statb(12) INTEGER*4 function lstat (name, statb)
character*(*) name
INTEGER*4 statb(12) INTEGER*4 function fstat (lunit, statb)
INTEGER*4 lunit, statb(12)

DESCRIPTION

These routines return detailed information about a file.  Stat returns information about file name; fstat returns information about the file associated with fortran logical unit lunit.  lstat is similar to stat except when the named file is a symbolic link, in which case lstat returns the information about the link, while stat returns information about the file to which the link points. 

Array statb contains fields from the stat structure (see stat(2)), in the following order.

 1  st_dev ID of device containing a
  directory entry for this file

 2  st_ino Inode number

 3  st_mode File type, attributes, and
  access control summary

 4  st_nlink Number of links

 5  st_uid User ID of file owner

 6  st_gid Group ID of file group

 7  st_rdev Device ID; this entry defined
  only for char or blk spec files

 8  st_size File size (bytes)

 9  st_atime Time of last access

10  st_mtime Last modification time

11  st_ctime Last file status change time
Measured in secs since
  00:00:00 GMT, Jan 1, 1970

12  st_blksize Block size (bytes)

The value of each function will be zero if successful; an error code otherwise. 

FILES

/usr/lib/libU77.a

SEE ALSO

stat(2), access(3F), perror(3F), time(3F)

BUGS

Pathnames can be no longer than MAXPATHLEN as defined in <sys/param.h>.

Hewlett-Packard Company  —  HP-UX Release 9.0: June 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026