- 论坛徽章:
- 0
|
原帖由 chopin1998 于 2007-3-23 16:25 发表
啊? 什么意思呢?
The lstat() function is identical to stat() except when the named file is
a symbolic link, in which case lstat() returns information about the link
itself, not the file the link references. Unlike other file system ob-
jects, symbolic links do not have an owner, group, access mode, times,
etc. Instead, these attributes are taken from the directory that con-
tains the link. The only attributes returned from an lstat() that refer
to the symbolic link itself are the file type (S_IFLNK), size, blocks,
and link count (always 1).
The fstat() function obtains the same information about an open file
known by the file descriptor fd.
The sb argument is a pointer to a stat() structure as defined by
<sys/stat.h> (shown below) and into which information is placed concern-
ing the file.
struct stat {
dev_t st_dev; /* device inode resides on */
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode's mode */
nlink_t st_nlink; /* number of hard links to the file */
uid_t st_uid; /* user ID of owner */
/usr/share/man/cat2/stat.0 29%
|
|