Stat (system call)

stat command line

stat() is a Unix system call that returns file attributes about an inode. The semantics of stat() vary between operating systems. As an example, Unix command ls uses this system call to retrieve information on files that includes:

  • atime: time of last access (ls -lu)
  • mtime: time of last modification (ls -l)
  • ctime: time of last status change (ls -lc)

stat appeared in Version 1 Unix. It is among the few original Unix system calls to change, with Version 4's addition of group permissions and larger file size.[1]

  1. ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Tubidy