语法格式
touch [参数] [文件]
常用参数:
-a
改变档案的读取时间记录
-m
改变档案的修改时间记录
-r
使用参考档的时间记录,与 --file 的效果一样
-c
不创建新文件
-d
设定时间与日期,可以使用各种不同的格式
-t
设定档案的时间记录,格式与 date 命令相同
--no-create
不创建新文件
--help
显示帮助信息
--version 列出版本讯息
参考实例
touch xing.txt
创建 txt 文件
touch a b c
创建多个文件
touch file{1..90}.txt 批量创建文本文件
https://xpanx.com/
评论