13 Linux touch
来源:互联网 发布:淘宝对接什么意思 编辑:程序博客网 时间:2024/06/06 17:13
命令格式:
touch [选项] 文件
命令功能:
- 新建文件
- 可更改文档或目录的日期时间,包括存取时间和更改时间
命令参数:
-a 或--time=atime或--time=access或--time=use 只更改存取时间。-c 或--no-create 不建立任何文档。-d 使用指定的日期时间,而非现在的时间。-m 或--time=mtime或--time=modify 只更改变动时间。-r 把指定文档或目录的日期时间,统统设成和参考文档或目录的日期时间相同(谁在前面谁就是参考文档或目录)-t 使用指定的日期时间,而非现在的时间。
此处的日期时间规定为如下形式的十进制数:
[[CC]YY]MMDDhhmm[.SS]
- CC为年数中的前两位;
- YY为年数的后两位,如果不给出CC的值,则CCYY限定在1969–2068之内;
- MM为月数;
- DD为天数;
- hh 为小时数;
- mm为分钟数;
- SS为秒数;
由于系统的限制,早于1970年1月1日的时间是错误的。
示例:
新建文件1.txt 2.txt 3.txt
touch 1.txt 2.txt 3.txt
设定1.txt的时间戳
touch -d 2000 1.txt
将2.txt和3.txt的日期时间修改至于1.txt一致
touch -r 1.txt 2.txt 3.txt
如果觉得本文对您有帮助,请点击‘顶’支持一下,您的支持是我写作最大的动力,谢谢。
0 0
- 13 Linux touch
- Linux touch
- linux ------ touch
- linux touch
- Linux命令:touch使用方法
- touch讲解(Linux)
- linux touch 命令详解
- Linux命令touch
- Linux date and touch
- linux命令-touch命令
- linux :touch 命令
- linux touch命令
- linux touch命令
- linux下touch
- linux命令之--touch
- Linux touch命令
- linux命令 -- touch 命令
- Linux命令:touch
- Keepalived+Nginx架构配置
- 1.2.3
- java5、java6、java7、java8的新特性
- Session原理解释,为什么使用session
- Deeplearning toolbox 中如何实现sparse/stack/denoise autoencoder (转载)
- 13 Linux touch
- 云虚拟主机+WordPress搭建个人博客(图文)
- jQuery ajax 提交表单一例
- 西安电子科技大学硕士论文latex模板第1章修改为第一章
- 逆波兰 计算器 C语言实现
- linux 关机命令总结
- ES6__异步开发优化
- 信息安全论学习笔记(二):密码学基础
- 逆波兰计算器: