获取文件的修改日期.更改文件内容,然后您可以通过touch命令更改修改日期.例如
touch -m -t 09082000 file
to change the modification time to 8 sep, 20:00.
Run Code Online (Sandbox Code Playgroud)
您也可以将修改日期更改为过去,对于10/15/1998 12:30,命令将是这样的:
touch -m -t 19981015123000 file
Run Code Online (Sandbox Code Playgroud)