linux touch命令

touch命令选项说明如下:

-c:强制不创建文件

-a:修改文件access time(atime)

-m:修改文件modification time(mtime)

-t:使用"[[CC]YY]MMDDhhmm[.ss]"格式的时间替代当前时间

-d:使用字符串描述的时间格式替代当前时间

举例:touch -a -t 201212211212 file # 将file文件的atime修改为2012年12月21号12点12分

原文地址:https://www.cnblogs.com/yangxuming/p/9291554.html