Chinaunix首页 | 论坛 | 博客
  • 博客访问: 159265
  • 博文数量: 25
  • 博客积分: 2045
  • 博客等级: 大尉
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-08 18:12
文章分类

全部博文(25)

文章存档

2012年(1)

2009年(8)

2008年(16)

我的朋友

分类: LINUX

2008-09-21 16:02:36

先man touch一下,可以看出touch命令主要用来修改文件的access and modification time
[root@test test]# date
Sun Sep 21 15:53:37 CST 2008
[root@test test]# touch test.txt
[root@test test]# ll
total 0
-rw-r--r--  1 root root 0 Sep 21 15:54 test.txt
[root@test test]# touch -m -t "0808091252" test.txt 
[root@test test]# ll
total 0
-rw-r--r--  1 root root 0 Aug  9 12:52 test.txt

-t 后面加的是修改时间,格式为[[CC]YY]MMDDhhmm[.ss] 即[年月日时分.秒]
-m为修改时间mtime
-a为访问时间atime
阅读(998) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~