是的,Linux中的find
命令可以用于修改文件的时间戳
find /path/to/directory -type f -exec touch -a {} \;
find /path/to/directory -type f -exec touch -m {} \;
find /path/to/directory -type f -exec touch -c {} \;
在这些示例中,/path/to/directory
是您要搜索的目录路径。-type f
表示我们只对文件感兴趣,而不是目录。-exec
选项表示对找到的每个文件执行指定的命令。
注意:在使用这些命令时,请确保您具有适当的权限,以免导致文件或目录损坏。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:linux find命令能按时间查找吗