当前位置: 首页 > wzjs >正文

酒泉如何做百度的网站郑州做网站公司有多少钱

酒泉如何做百度的网站,郑州做网站公司有多少钱,ppt网站链接怎么做,昆明网红街参考资料 Linux 常用命令 - touch 【创建空文件与修改时间戳】 目录 一. 用法简介二. 配合扩展字符,批量创建文件三. 修改文件的时间戳3.1 -t 配置项3.2 -d 配置项3.3 配合find命令实现批量时间戳修改 四. 结合 find 批量创建相同时间的新文件 一. 用法简介 ⏹当指…

参考资料

  1. Linux 常用命令 - touch 【创建空文件与修改时间戳】

目录

  • 一. 用法简介
  • 二. 配合扩展字符,批量创建文件
  • 三. 修改文件的时间戳
    • 3.1 `-t` 配置项
    • 3.2 `-d` 配置项
    • 3.3 配合find命令实现批量时间戳修改
  • 四. 结合 `find` 批量创建相同时间的新文件


一. 用法简介

⏹当指定的文件不存在的时候,创建一个空文件;当文件存在的时候,修改文件的时间戳为当前的时间。

  • -d, --date:将文件时间更新为指定的日期时间,而非当前的时间;日期格式需要符合系统的日期格式要求。
  • -t :将文件时间更新为指定格式[[CC]YY]MMDDhhmm[.ss]的日期时间,而非当前的时间。
  • -c:仅修改既存文件的时间戳,如果指定的文件并不存在,不会创建新的文件。
  • -m:只更新文件的修改时间。
touch [OPTION]... FILE...

二. 配合扩展字符,批量创建文件

🧐对于测试时,需要批量创建若干文件的场景,此方式很实用🧐

  • 创建 file1.txt ~ file5.txt 的空文件
touch file{1..5}.txt
  • 创建2023年 ~ 2024年每天的文件(会创建出不存在的月份的文件,如20240231,之后手动删除即可)
touch {2023..2024}{01..12}{01..31}_PAY_INFO_MSG.csv
  • 还可以嵌套创建
apluser@ubuntu24-01:~/work/20250326$ touch file_{1..3}.{mp{3..4},m4{a,b,p,v}}
apluser@ubuntu24-01:~/work/20250326$
apluser@ubuntu24-01:~/work/20250326$ ls | xargs -L 6
file_1.m4a file_1.m4b file_1.m4p file_1.m4v file_1.mp3 file_1.mp4
file_2.m4a file_2.m4b file_2.m4p file_2.m4v file_2.mp3 file_2.mp4
file_3.m4a file_3.m4b file_3.m4p file_3.m4v file_3.mp3 file_3.mp4

三. 修改文件的时间戳

3.1 -t 配置项

  • 将 file.txt 的时间戳设为 2024-03-25 12:30,如果文件不存在的话会创建。
apluser@ubuntu24-01:~/work/20250326$ touch -t 202403251230 file.txt
apluser@ubuntu24-01:~/work/20250326$
apluser@ubuntu24-01:~/work/20250326$ ls -l --time-style="+%Y-%m-%d %H:%M:%S"
total 0
-rw-rw-r-- 1 apluser apluser 0 2024-03-25 12:30:00 file.txt

3.2 -d 配置项

  • -d指定了时间格式,时间格式需要是字符串
apluser@ubuntu24-01:~/work/20250326$ ls -l --time-style="+%Y-%m-%d %H:%M:%S"
total 0
-rw-rw-r-- 1 apluser apluser 0 2024-03-25 12:30:00 file.txt
apluser@ubuntu24-01:~/work/20250326$
apluser@ubuntu24-01:~/work/20250326$ touch -d "2020-01-01 10:00" file.txt
apluser@ubuntu24-01:~/work/20250326$
apluser@ubuntu24-01:~/work/20250326$ ls -l --time-style="+%Y-%m-%d %H:%M:%S"
total 0
-rw-rw-r-- 1 apluser apluser 0 2020-01-01 10:00:00 file.txt

3.3 配合find命令实现批量时间戳修改

  • 文件较少时使用, 例如只有几百个
find /path/to/dir -type f -exec touch {} \;
  • 文件很多时使用, 执行效率更高
  • -print0-0是为了避免有特殊符号的文件名才使用的。如果没有特殊符号的文件名,可不用
find /path/to/dir -type f -print0 | xargs -0 touch

四. 结合 find 批量创建相同时间的新文件

  • /path 下,每个文件都创建一个同时间戳的 .new 文件
  • -r 选项的作用是 复制另一个文件的时间戳(reference 参考时间)
find /path -type f -exec touch -r {} {}.new \;

文章转载自:

http://3l4ggTfl.ndtzy.cn
http://roI0ZZMp.ndtzy.cn
http://jD3EHEIs.ndtzy.cn
http://xQj5pUxe.ndtzy.cn
http://zh9C6yVm.ndtzy.cn
http://04IaqAwP.ndtzy.cn
http://J7xs0OC9.ndtzy.cn
http://zHjgZdXy.ndtzy.cn
http://ItLZwr6l.ndtzy.cn
http://SzCBJuWq.ndtzy.cn
http://dnGEQrDI.ndtzy.cn
http://S9PTabmX.ndtzy.cn
http://TCQ7aWgk.ndtzy.cn
http://utxaPgBC.ndtzy.cn
http://wR65XQy6.ndtzy.cn
http://y3CACuIx.ndtzy.cn
http://ffayJvid.ndtzy.cn
http://aZ69NXSC.ndtzy.cn
http://7BAF9dIC.ndtzy.cn
http://xUQPzsSI.ndtzy.cn
http://kRn7fVl7.ndtzy.cn
http://UYWA0B1O.ndtzy.cn
http://ZRje41Ab.ndtzy.cn
http://IEqcCI8j.ndtzy.cn
http://rrPAivqc.ndtzy.cn
http://Czdtcu3Q.ndtzy.cn
http://IzOXYyfW.ndtzy.cn
http://OJknhaq7.ndtzy.cn
http://4iYNpvqN.ndtzy.cn
http://ejRdxWLr.ndtzy.cn
http://www.dtcms.com/wzjs/714565.html

相关文章:

  • 博达网站建设教程济南地产行业网站开发
  • 雄安智能网站建设公司phpcmsv9 网站搬家
  • 做网站商城需要什么软件可以建网站的软件
  • 展示照片的网站崇信县门户网站领导之窗
  • 网站开发属于软件开发吗农业开发公司企业网站建设
  • 合肥哪个公司做网站好廊坊短视频优化
  • 泸西县建设小学网站建设工程招标公告在哪个网站
  • 企业网站功效化妆品购物网站建设目的
  • 网站开发研发工程师岗位职责织梦做的网站怎么传到网上
  • 闽侯县住房和城乡建设局网站成都建站开发
  • 建设银行考试报名网站网页设计登录注册页面代码
  • 成都的网站设计公司价格wordpress 页面 小工具
  • 北京做网站建设的公司排名徐州万网网站建设
  • 海外推广什么意思网站优化名词解释
  • pc网站建设做任务拍照片赚钱的网站
  • 企业做网站需要做哪些工作网站网页设计如何选
  • 万网创始人为什么封停慧聪网windows优化大师的作用
  • 网站建设方案概述装饰行业做网站
  • 个人网站源码免费下载青岛网络推广教程
  • 免费网站cms企业官网开发公司
  • 能自己做二次元人物的网站百度自己的宣传广告
  • 做网站的成功案例广告传媒公司黄页
  • 张家港网站设计制作早晨设计公司内部网站怎么做
  • 网站开发趋势Centos建网站必须域名
  • 南昌商城网站设计宜城网站定制
  • 代写软文费用全网天下实惠云南网站推广优化
  • 中小网站建设都有哪些wordpress修改插件
  • 专业网站建设案例网站建设竣工验收报告
  • 免费网站注册永久薛华成 旅游网站建设
  • 网站 运营工作如何做网站wap设置