找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

touch命令使用

2009-12-20 13:29| 发布者: admin| 查看: 36| 评论: 0|原作者: 云天青

先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







最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 09:31 , Processed in 0.203072 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部