linux下面修改目录下所有文件时间

查看文件的时间:
sata test.txt

更新目录下面所有文件的时间:
find ./* -type f -exec touch {} \;

更新目录下面所有目录的时间:
find ./* -type d -exec touch {} \;

修改一个文件的日期时间:
touch -d "2020-11-11 11:00:00" test.txt

猜你喜欢

转载自blog.51cto.com/7794482/2444531