linux下的touch命令
来源:互联网 发布:代申请淘宝达人大v 编辑:程序博客网 时间:2024/06/05 05:00
名称:touch
使用权限:所有使用者
使用方式:
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 ...]
说明:
touch 指令改变档案的时间记录。 ls -l 可以显示档案的时间记录。
参数:
a 改变档案的读取时间记录。
m 改变档案的修改时间记录。
c 假如目的档案不存在,不会建立新的档案。与 --no-create 的效果一样。
f 不使用,是为了与其他 unix 系统的相容性而保留。
r 使用参考档的时间记录,与 --file 的效果一样。
d 设定时间与日期,可以使用各种不同的格式。
t 设定档案的时间记录,格式与 date 指令相同。
--no-create 不会建立新档案。
--help 列出指令格式。
--version 列出版本讯息。
范例:
最简单的使用方式,将档案的时候记录改为现在的时间。若档案不存在,系统会建立一个新的档案。
touch file
touch file1 file2
将 file 的时间记录改为 5 月 6 日 18 点 3 分,公元两千年。时间的格式可以参考 date 指令,至少需输入 MMDDHHmm ,就是月日时与分。
touch -c -t 05061803 file
touch -c -t 050618032000 file
将 file 的时间记录改变成与 referencefile 一样。
touch -r referencefile file
将 file 的时间记录改成 5 月 6 日 18 点 3 分,公元两千年。时间可以使用 am, pm 或是 24 小时的格式,日期可以使用其他格式如 6 May 2000 。
touch -d "6:03pm" file
touch -d "05/06/2000" file
touch -d "6:03pm 05/06/2000" file
- linux下的touch命令
- linux下的touch命令
- Linux下touch命令的用法
- linux下的touch命令详解
- linux的touch命令
- xnix下的touch命令
- Linux的touch命令使用
- Linux的touch命令与cat命令
- linux命令-touch命令
- linux命令 -- touch 命令
- linux中touch命令的常见用法
- 强悍的 Linux —— touch 命令
- linux里的touch命令详解
- Linux / Mac 下 基本的 bash shell 命令详解(touch 、cp、mv、rm)
- Linux命令:touch使用方法
- linux touch 命令详解
- Linux命令touch
- linux :touch 命令
- COM组件设计与应用(链接)
- Symbian软件开发(2):第1个GUI程序
- Symbian软件开发(3):运行S60 3rd FP1版控制台程序
- linux下的要所/解压缩命令
- 好. 也算是有个博客了... 那也要用用了
- linux下的touch命令
- XP运行命令一览
- New-Item 帮助信息
- altas(ajax)控件(二十一):判断密码的强弱程度的控件PasswordStrength
- 读写混合的数据类型
- 在delphi端构建数据库事务
- 下周就要发07年上半年5月份软考的证书了,到"信息产业部电子教育与考试中心"网上看了一下,呵呵竟然进了软设前五十名
- 在程序中处理外部文件拖放
- the tale of us