Chinaunix首页 | 论坛 | 博客
  • 博客访问: 150382
  • 博文数量: 20
  • 博客积分: 2535
  • 博客等级: 少校
  • 技术积分: 410
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-17 11:59
文章分类

全部博文(20)

文章存档

2009年(18)

2008年(2)

我的朋友

分类: LINUX

2009-04-28 15:21:04

atime 访问时间(access time):访问时间是文件最后一次被读取的时间。因此阅读一个文件会更新它的访问时间,而它的改变时间并没有变化(有关文件状态的信息没有被改变),它的修改时间也同样没有变化(文件内容本身没有被改变);

mtime 修改时间(modification time):文件内容最后被修改的时间。如 echo “Hello” >myfile ,则myfile的mtime被改变,同时ctime和atime也被改变;

ctime 改变时间(change time):文件状态(status)最后被改变的时间。如 chmod a+w myfile ,则myfile的ctime被改变,atime和mtime都不变;

参考:

st_atime
Time when file data was last accessed. Changed by  the
following   functions:   creat(),   mknod(),   pipe(),
utime(2), and read(2).

st_mtime
Time when data was last modified. Changed by the  fol-
lowing  functions:  creat(), mknod(), pipe(), utime(),
and write(2).

st_ctime
Time when file status was last changed. Changed by the
following   functions:   chmod(),   chown(),  creat(),
link(2),  mknod(),  pipe(),  unlink(2),  utime(),  and
write().

阅读(1591) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~