使用touch命令:将文件的时间修改为2013年1月21日19点25分
touch -c -m -t 201301211925 version.dat 前提是必须有这个文件。
解释说明:
-c表示不创建文件 --no-create do not create any files
-m仅仅改变时间 change only the modification time
-t表示时间戳STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time
在Linux系统里面可以通过命令man touch 查看touch的使用方法
本文详细介绍了Linux系统中touch命令的使用方法,包括如何使用-c、-m和-t选项来更新文件的时间戳,而不创建文件或仅更改修改时间。通过具体示例,读者可以学会如何将文件的时间设置为特定日期和时间。

被折叠的 条评论
为什么被折叠?



