打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
How to change file’s modification / access time

How to change file’s modification / access time?

How to change file's modification time?

Answer:

1. To see the current file stats, use

# stats test.txtstat test.txtFile: `test.txt'Size: 25557           Blocks: 56         IO Block: 4096   regular fileDevice: ca01h/51713d    Inode: 32714       Links: 1Access: (0644/-rw-r--r--)  Uid: ( 1001/    user)   Gid: ( 1000/ user)Access: 2010-01-02 18:53:46.000000000 +0800Modify: 1970-01-01 17:13:08.000000000 +0800Change: 2010-01-02 18:53:46.000000000 +0800

2. To change the file's mtime (Modification time), use

touch -m -d '1 Jan 2006 12:34' test.txt

3. To change the file's atime (Last access time), use

touch -a -d '1 Jan 2006 12:34' test.txt

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
touch - change file timestamps
ls - list directory contents
linux文件的三个时间,修改文件时间为任意时间
Fix u'ufeff' Invalid Character When Reading File in Python
print
Find–atime –ctime –mtime的用法与区别总结
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服