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

20250602在Ubuntu20.04.6下修改压缩包的日期和时间

rootroot@rootroot-X99-Turbo:~$ ll
-rwxrwxrwx   1 rootroot rootroot 36247187308 5月  23 10:23  Android13.0地面站.tgz*
rootroot@rootroot-X99-Turbo:~$ touch 1Android13.0地面站.tgz 
rootroot@rootroot-X99-Turbo:~$ ll
-rwxrwxrwx   1 rootroot rootroot 36247187308 6月   2 09:56  1Android13.0地面站.tgz*
rootroot@rootroot-X99-Turbo:~$ ll
-rwxrwxrwx   1 rootroot rootroot 36247187308 6月   2 09:56  Android13.0地面站.tgz*


20250602在Ubuntu20.04.6下修改压缩包的日期和时间
2025/6/2 14:42


BING:linux 修改 文件 日期和时间 为当前日期和时间
百度:linux 修改 文件 日期和时间


https://chat.deepseek.com/a/chat/s/282d18b1-0f7f-42d2-a4ba-2f5750f7b363
Ubuntu修改文件时间方法总结
ubuntu 修改文件时间和日期 为当前的
在 Ubuntu 中,你可以使用 touch 命令来修改文件的时间戳(包括访问时间和修改时间)为当前时间。以下是具体方法:

1. 将文件的时间戳更新为当前时间
bash
touch 文件名
这会将文件的访问时间(atime)和修改时间(mtime)都更新为当前时间。

2. 仅修改文件的修改时间(mtime)为当前时间
bash
touch -m 文件名
3. 仅修改文件的访问时间(atime)为当前时间
bash
touch -a 文件名
4. 修改为自定义时间(而非当前时间)
如果你想将文件时间设置为指定的时间而不是当前时间,可以使用:

bash
touch -t 202406021830.00 文件名
其中:

202406021830.00 表示 YYYYMMDDhhmm.ss(年月日时分.秒)格式的时间。

5. 递归修改目录及其子目录下的所有文件时间
bash
find 目录名 -exec touch {} \;
这会将该目录及其子目录下的所有文件的时间戳更新为当前时间。

注意事项
你需要有对文件的写入权限才能修改其时间戳。

如果文件不存在,touch 会创建一个新的空文件。

希望这些方法能帮到你!


完整的LOG:
rootroot@rootroot-X99-Turbo:~$ ll
total 35397940
drwxr-xr-x  51 rootroot rootroot        4096 6月   2 09:56  ./
drwxr-xr-x   5 root     root            4096 2月  25 09:37  ../
drwxrwxr-x  11 rootroot rootroot        4096 4月  25 17:04  01临时了friendlywrt-h3/
drwxrwxr-x  12 rootroot rootroot        4096 5月   6 11:26  02临时了-单线程编译通过了friendlywrt-h3/
drwxrwxrwx   2 rootroot rootroot        4096 5月   7 11:52  07_源代码/
drwxrwxrwx   3 rootroot rootroot        4096 5月  30 19:07  20241224的神州数码RK3566/
drwxrwxr-x  16 rootroot rootroot        4096 5月  12 11:44  61临时了sd-fuse_h3/
drwxrwxr-x   9 rootroot rootroot        4096 5月  12 17:37  62临时了sd-fuse_h3/
drwxrwxr-x   8 rootroot rootroot        4096 5月  17 16:28  63临时了sd-fuse_h3/
drwxrwxr-x  13 rootroot rootroot        4096 5月  20 09:27  64临时了sd-fuse_h3/
drwxrwxrwx  36 rootroot rootroot        4096 5月  26 15:31  Android13.0/
-rwxrwxrwx   1 rootroot rootroot 36247187308 5月  23 10:23  Android13.0地面站.tgz*
-rw-r--r--   1 rootroot rootroot        3771 4月  25 10:29  bak1.bashrc
-rw-------   1 rootroot rootroot       28956 5月  30 19:15  .bash_history
-rw-r--r--   1 rootroot rootroot         220 2月  24 18:43  .bash_logout
-rw-r--r--   1 rootroot rootroot        3852 4月  25 10:30  .bashrc
drwxrwxr-x   4 rootroot rootroot        4096 5月  13 16:31  BOOT/
drwxr-xr-x  20 rootroot rootroot        4096 5月  30 10:23  .buildroot-ccache/
drwx------   2 rootroot rootroot        4096 4月  23 13:45 'buildroot linux系统的cpu频率无法查看和修改呢?'/
drwx------ 137 rootroot rootroot        4096 5月  27 11:08  .cache/
drwxr-xr-x   3 rootroot rootroot        4096 4月  25 15:38  .cmake/
drwx------  20 rootroot rootroot        4096 5月  22 09:13  .config/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Desktop/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Documents/
drwxr-xr-x   2 rootroot rootroot        4096 5月  19 17:18  Downloads/
drwx------   3 rootroot rootroot        4096 4月  29 20:06  .gnupg/
drwxrwxr-x   2 rootroot rootroot        4096 4月  25 17:00  h3/
drwxrwxr-x   5 rootroot rootroot        4096 6月   2 09:53  hailuo_temp/
drwxr-xr-x   5 rootroot rootroot        4096 3月   7 09:39  .local/
drwx------   2 rootroot rootroot        4096 4月  25 17:29  LOG/
drwx------   4 rootroot rootroot        4096 2月  27 17:35  .mozilla/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Music/
drwx------   3 rootroot rootroot        4096 3月   7 11:04  .nv/
drwxr-xr-x   2 rootroot rootroot       20480 5月  27 17:22  Pictures/
drwx------   3 rootroot rootroot        4096 3月  12 18:47  .pki/
-rw-r--r--   1 rootroot rootroot         807 2月  24 18:43  .profile
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Public/
-rw-------   1 rootroot rootroot           7 3月   5 10:32  .python_history
drwxrwxr-x   3 rootroot rootroot        4096 5月  20 14:41  quectel-cm/
drwxrwxr-x   3 rootroot rootroot        4096 5月   6 09:31  r6s/
-rw-r--r--   1 rootroot rootroot           2 5月  30 18:46  .repo_.gitconfig.json
drwxr-xr-x  35 rootroot rootroot        4096 4月  10 09:23  RK3566_RK3568_Linux5.10_V1.2.0/
drwx------  19 rootroot rootroot        4096 5月   9 14:44  RK3566的吊舱-IIMG/
drwx------   2 rootroot rootroot        4096 4月  24 18:36  RK3588+4800w/
drwxrwxr-x  12 rootroot rootroot        4096 5月  21 09:07  sd-fuse_h3/
drwx------   3 rootroot rootroot        4096 4月  24 17:09  snap/
drwxrwxrwx  16 rootroot rootroot        4096 5月   9 14:43  source/
drwx------   2 rootroot rootroot        4096 5月  10 16:40  .ssh/
-rw-r--r--   1 rootroot rootroot           0 2月  25 09:05  .sudo_as_admin_successful
drwxrwxr-x   2 rootroot rootroot        4096 3月  12 18:47 'Sunlogin Files'/
drwxrwxr-x  34 rootroot rootroot        4096 5月  30 18:52  tao_android13/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Templates/
drwx------   3 rootroot rootroot        4096 6月   2 09:07  tgz/
drwx------   6 rootroot rootroot        4096 4月   7 12:05  .thunderbird/
drwxrwxr-x  13 rootroot rootroot        4096 5月  30 09:41  version/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Videos/
drwxr-xr-x   2 rootroot rootroot        4096 4月  30 19:06  .vmware/
drwxrwxr-x   4 rootroot rootroot        4096 4月  30 10:27  vmware/
-rw-r--r--   1 rootroot rootroot         221 5月  20 14:36  .wget-hsts
drwxrwxr-x   8 rootroot rootroot        4096 3月   7 11:53  whisper/
-rw-------   1 rootroot rootroot         256 6月   2 09:56  .Xauthority
drwx------   2 rootroot rootroot        4096 3月  22 14:59  摄像头/
-rwx------   1 rootroot rootroot         376 5月  30 16:52  说明.txt*
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ touch 1Android13.0地面站.tgz 
rootroot@rootroot-X99-Turbo:~$ ll
total 35397940
drwxr-xr-x  51 rootroot rootroot        4096 6月   2 09:56  ./
drwxr-xr-x   5 root     root            4096 2月  25 09:37  ../
drwxrwxr-x  11 rootroot rootroot        4096 4月  25 17:04  01临时了friendlywrt-h3/
drwxrwxr-x  12 rootroot rootroot        4096 5月   6 11:26  02临时了-单线程编译通过了friendlywrt-h3/
drwxrwxrwx   2 rootroot rootroot        4096 5月   7 11:52  07_源代码/
-rwxrwxrwx   1 rootroot rootroot 36247187308 6月   2 09:56  1Android13.0地面站.tgz*
drwxrwxrwx   3 rootroot rootroot        4096 5月  30 19:07  20241224的神州数码RK3566/
drwxrwxr-x  16 rootroot rootroot        4096 5月  12 11:44  61临时了sd-fuse_h3/
drwxrwxr-x   9 rootroot rootroot        4096 5月  12 17:37  62临时了sd-fuse_h3/
drwxrwxr-x   8 rootroot rootroot        4096 5月  17 16:28  63临时了sd-fuse_h3/
drwxrwxr-x  13 rootroot rootroot        4096 5月  20 09:27  64临时了sd-fuse_h3/
drwxrwxrwx  36 rootroot rootroot        4096 5月  26 15:31  Android13.0/
-rw-r--r--   1 rootroot rootroot        3771 4月  25 10:29  bak1.bashrc
-rw-------   1 rootroot rootroot       28956 5月  30 19:15  .bash_history
-rw-r--r--   1 rootroot rootroot         220 2月  24 18:43  .bash_logout
-rw-r--r--   1 rootroot rootroot        3852 4月  25 10:30  .bashrc
drwxrwxr-x   4 rootroot rootroot        4096 5月  13 16:31  BOOT/
drwxr-xr-x  20 rootroot rootroot        4096 5月  30 10:23  .buildroot-ccache/
drwx------   2 rootroot rootroot        4096 4月  23 13:45 'buildroot linux系统的cpu频率无法查看和修改呢?'/
drwx------ 137 rootroot rootroot        4096 5月  27 11:08  .cache/
drwxr-xr-x   3 rootroot rootroot        4096 4月  25 15:38  .cmake/
drwx------  20 rootroot rootroot        4096 5月  22 09:13  .config/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Desktop/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Documents/
drwxr-xr-x   2 rootroot rootroot        4096 5月  19 17:18  Downloads/
drwx------   3 rootroot rootroot        4096 4月  29 20:06  .gnupg/
drwxrwxr-x   2 rootroot rootroot        4096 4月  25 17:00  h3/
drwxrwxr-x   5 rootroot rootroot        4096 6月   2 09:53  hailuo_temp/
drwxr-xr-x   5 rootroot rootroot        4096 3月   7 09:39  .local/
drwx------   2 rootroot rootroot        4096 4月  25 17:29  LOG/
drwx------   4 rootroot rootroot        4096 2月  27 17:35  .mozilla/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Music/
drwx------   3 rootroot rootroot        4096 3月   7 11:04  .nv/
drwxr-xr-x   2 rootroot rootroot       20480 5月  27 17:22  Pictures/
drwx------   3 rootroot rootroot        4096 3月  12 18:47  .pki/
-rw-r--r--   1 rootroot rootroot         807 2月  24 18:43  .profile
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Public/
-rw-------   1 rootroot rootroot           7 3月   5 10:32  .python_history
drwxrwxr-x   3 rootroot rootroot        4096 5月  20 14:41  quectel-cm/
drwxrwxr-x   3 rootroot rootroot        4096 5月   6 09:31  r6s/
-rw-r--r--   1 rootroot rootroot           2 5月  30 18:46  .repo_.gitconfig.json
drwxr-xr-x  35 rootroot rootroot        4096 4月  10 09:23  RK3566_RK3568_Linux5.10_V1.2.0/
drwx------  19 rootroot rootroot        4096 5月   9 14:44  RK3566的吊舱-IIMG/
drwx------   2 rootroot rootroot        4096 4月  24 18:36  RK3588+4800w/
drwxrwxr-x  12 rootroot rootroot        4096 5月  21 09:07  sd-fuse_h3/
drwx------   3 rootroot rootroot        4096 4月  24 17:09  snap/
drwxrwxrwx  16 rootroot rootroot        4096 5月   9 14:43  source/
drwx------   2 rootroot rootroot        4096 5月  10 16:40  .ssh/
-rw-r--r--   1 rootroot rootroot           0 2月  25 09:05  .sudo_as_admin_successful
drwxrwxr-x   2 rootroot rootroot        4096 3月  12 18:47 'Sunlogin Files'/
drwxrwxr-x  34 rootroot rootroot        4096 5月  30 18:52  tao_android13/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Templates/
drwx------   3 rootroot rootroot        4096 6月   2 09:07  tgz/
drwx------   6 rootroot rootroot        4096 4月   7 12:05  .thunderbird/
drwxrwxr-x  13 rootroot rootroot        4096 5月  30 09:41  version/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Videos/
drwxr-xr-x   2 rootroot rootroot        4096 4月  30 19:06  .vmware/
drwxrwxr-x   4 rootroot rootroot        4096 4月  30 10:27  vmware/
-rw-r--r--   1 rootroot rootroot         221 5月  20 14:36  .wget-hsts
drwxrwxr-x   8 rootroot rootroot        4096 3月   7 11:53  whisper/
-rw-------   1 rootroot rootroot         256 6月   2 09:56  .Xauthority
drwx------   2 rootroot rootroot        4096 3月  22 14:59  摄像头/
-rwx------   1 rootroot rootroot         376 5月  30 16:52  说明.txt*
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ ll
total 35397940
drwxr-xr-x  51 rootroot rootroot        4096 6月   2 09:57  ./
drwxr-xr-x   5 root     root            4096 2月  25 09:37  ../
drwxrwxr-x  11 rootroot rootroot        4096 4月  25 17:04  01临时了friendlywrt-h3/
drwxrwxr-x  12 rootroot rootroot        4096 5月   6 11:26  02临时了-单线程编译通过了friendlywrt-h3/
drwxrwxrwx   2 rootroot rootroot        4096 5月   7 11:52  07_源代码/
drwxrwxrwx   3 rootroot rootroot        4096 5月  30 19:07  20241224的神州数码RK3566/
drwxrwxr-x  16 rootroot rootroot        4096 5月  12 11:44  61临时了sd-fuse_h3/
drwxrwxr-x   9 rootroot rootroot        4096 5月  12 17:37  62临时了sd-fuse_h3/
drwxrwxr-x   8 rootroot rootroot        4096 5月  17 16:28  63临时了sd-fuse_h3/
drwxrwxr-x  13 rootroot rootroot        4096 5月  20 09:27  64临时了sd-fuse_h3/
drwxrwxrwx  36 rootroot rootroot        4096 5月  26 15:31  Android13.0/
-rwxrwxrwx   1 rootroot rootroot 36247187308 6月   2 09:56  Android13.0地面站.tgz*
-rw-r--r--   1 rootroot rootroot        3771 4月  25 10:29  bak1.bashrc
-rw-------   1 rootroot rootroot       28956 5月  30 19:15  .bash_history
-rw-r--r--   1 rootroot rootroot         220 2月  24 18:43  .bash_logout
-rw-r--r--   1 rootroot rootroot        3852 4月  25 10:30  .bashrc
drwxrwxr-x   4 rootroot rootroot        4096 5月  13 16:31  BOOT/
drwxr-xr-x  20 rootroot rootroot        4096 5月  30 10:23  .buildroot-ccache/
drwx------   2 rootroot rootroot        4096 4月  23 13:45 'buildroot linux系统的cpu频率无法查看和修改呢?'/
drwx------ 137 rootroot rootroot        4096 5月  27 11:08  .cache/
drwxr-xr-x   3 rootroot rootroot        4096 4月  25 15:38  .cmake/
drwx------  20 rootroot rootroot        4096 5月  22 09:13  .config/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Desktop/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Documents/
drwxr-xr-x   2 rootroot rootroot        4096 5月  19 17:18  Downloads/
drwx------   3 rootroot rootroot        4096 4月  29 20:06  .gnupg/
drwxrwxr-x   2 rootroot rootroot        4096 4月  25 17:00  h3/
drwxrwxr-x   5 rootroot rootroot        4096 6月   2 09:53  hailuo_temp/
drwxr-xr-x   5 rootroot rootroot        4096 3月   7 09:39  .local/
drwx------   2 rootroot rootroot        4096 4月  25 17:29  LOG/
drwx------   4 rootroot rootroot        4096 2月  27 17:35  .mozilla/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Music/
drwx------   3 rootroot rootroot        4096 3月   7 11:04  .nv/
drwxr-xr-x   2 rootroot rootroot       20480 5月  27 17:22  Pictures/
drwx------   3 rootroot rootroot        4096 3月  12 18:47  .pki/
-rw-r--r--   1 rootroot rootroot         807 2月  24 18:43  .profile
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Public/
-rw-------   1 rootroot rootroot           7 3月   5 10:32  .python_history
drwxrwxr-x   3 rootroot rootroot        4096 5月  20 14:41  quectel-cm/
drwxrwxr-x   3 rootroot rootroot        4096 5月   6 09:31  r6s/
-rw-r--r--   1 rootroot rootroot           2 5月  30 18:46  .repo_.gitconfig.json
drwxr-xr-x  35 rootroot rootroot        4096 4月  10 09:23  RK3566_RK3568_Linux5.10_V1.2.0/
drwx------  19 rootroot rootroot        4096 5月   9 14:44  RK3566的吊舱-IIMG/
drwx------   2 rootroot rootroot        4096 4月  24 18:36  RK3588+4800w/
drwxrwxr-x  12 rootroot rootroot        4096 5月  21 09:07  sd-fuse_h3/
drwx------   3 rootroot rootroot        4096 4月  24 17:09  snap/
drwxrwxrwx  16 rootroot rootroot        4096 5月   9 14:43  source/
drwx------   2 rootroot rootroot        4096 5月  10 16:40  .ssh/
-rw-r--r--   1 rootroot rootroot           0 2月  25 09:05  .sudo_as_admin_successful
drwxrwxr-x   2 rootroot rootroot        4096 3月  12 18:47 'Sunlogin Files'/
drwxrwxr-x  34 rootroot rootroot        4096 5月  30 18:52  tao_android13/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Templates/
drwx------   3 rootroot rootroot        4096 6月   2 09:07  tgz/
drwx------   6 rootroot rootroot        4096 4月   7 12:05  .thunderbird/
drwxrwxr-x  13 rootroot rootroot        4096 5月  30 09:41  version/
drwxr-xr-x   2 rootroot rootroot        4096 2月  24 18:55  Videos/
drwxr-xr-x   2 rootroot rootroot        4096 4月  30 19:06  .vmware/
drwxrwxr-x   4 rootroot rootroot        4096 4月  30 10:27  vmware/
-rw-r--r--   1 rootroot rootroot         221 5月  20 14:36  .wget-hsts
drwxrwxr-x   8 rootroot rootroot        4096 3月   7 11:53  whisper/
-rw-------   1 rootroot rootroot         256 6月   2 09:56  .Xauthority
drwx------   2 rootroot rootroot        4096 3月  22 14:59  摄像头/
-rwx------   1 rootroot rootroot         376 5月  30 16:52  说明.txt*
rootroot@rootroot-X99-Turbo:~$ 


http://www.xdnf.cn/news/767251.html

相关文章:

  • 分布式锁优化:使用Lua脚本保证释放锁的原子性问题
  • SQL进阶之旅 Day 12:分组聚合与HAVING高效应用
  • 微服务-Sentinel
  • Oracle expdp过滤部分表数据
  • vue-12 (路由守卫:全局、每个路由和组件内)
  • 【Unity】相机 Cameras
  • 项目管理进阶:56页大型IT项目管理实践经验分享【附全文阅读】
  • 数据库系统概论(十四)详细讲解SQL中空值的处理
  • Leetcode 2123. 使矩阵中的 1 互不相邻的最小操作数
  • 数据结构之堆:解析与应用
  • 高阶数据结构——并查集
  • vscode 插件 eslint, 检查 js 语法
  • mysql分布式教程
  • 构建高性能风控指标系统
  • AIGC工具平台-GPT-SoVITS-v4-TTS音频推理克隆
  • Arbitrum Stylus 合约实战 :Rust 实现 ERC721
  • Windows 账号管理与安全指南
  • Java后端优化:对象池模式解决高频ObjectMapper实例化问题及性能影响
  • SCAU8639--折半插入排序
  • JS手写代码篇---手写类型判断函数
  • Linux 基础指令入门指南:解锁命令行的实用密码
  • 无他相机:专业摄影,触手可及
  • 【C++高级主题】转换与多个基类
  • 电力系统时间同步系统
  • 玩客云 OEC/OECT 笔记(2) 运行RKNN程序
  • 一步一步配置 Ubuntu Server 的 NodeJS 服务器详细实录——4. 配置服务器终端环境 zsh , oh my zsh, vim
  • 数智管理学(十六)
  • 需求调研文档——日志文件error监控报警脚本
  • CSS强制div单行显示不换行
  • Qt/C++编写GB28181服务端工具/绿色版开箱即用/对标wvp-gb28181/实时画面预览/录像回放下载