指令名称:touch 功能介绍:touch指令改变档案的时间记录。ls -l可以显示档案的时间记录。 语法格式: touch [-acfm] [-r reference-file] [--file=reference-file] [-t MMDDhhmm[[CC]YY][.ss]] [-d time] [--date=time] [--time={atime,access,use,mtime,modify}] [--no-create] [--help] [--version] file1 [file2 ...] 常用参数说明: a 改变档案的读取时间记录。 m 改变档案的修改时间记录。 c 假如目的档案不存在,不会建立新的档案。与 --no-create 的效果一样。 f 不使用,是为了与其他 unix 系统的相容性而保留。 r 使用参考档的时间记录,与 --file 的效果一样。 d 设定时间与日期,可以使用各种不同的格式。 t 设定档案的时间记录,格式与 date 指令相同。 --no-create 不会建立新档案。 --help 列出指令格式。 --version 列出版本讯息。 指令使用实例: |