标签:
struct stat { mode_t st_mode; /* file type & mode (permissions) */ ino_t st_ino; /* i-node number (serial number) */ dev_t st_dev; /* device number (file system) */ dev_t st_rdev; /* device number for special files */ nlink_t st_nlink; /* number of links */ uid_t st_uid; /* user ID of owner */ gid_t st_gid; /* group ID of owner */ off_t st_size; /* size in bytes, for regular files */ time_t st_atime; /* time of last access */ time_t st_mtime; /* time of last modification */ time_t st_ctime; /* time of last file status change */ blksize_t st_blksize; /* best I/O block size */ blkcnt_t st_blocks; /* number of disk blocks allocated */ };
atime 文件最近被访问的时间
mtime 文件最近被修改的时间,指内容被修改
ctime 文件状态最近被改变的时间,指改变文件状态,permission等
ls -l 命令默认打印文件的mtime,按字典顺序排序,-t 为按mtime排序
标签:
原文地址:http://my.oschina.net/u/2313065/blog/474702