重庆思庄Oracle、Redhat认证学习论坛
标题:
linux下如何察看某个文件或目录的atime,ctime,mtime
[打印本页]
作者:
郑全
时间:
2018-1-7 18:31
标题:
linux下如何察看某个文件或目录的atime,ctime,mtime
linux提供了很方便的一个命令,stat file:
[root@rac01 app]# pwd
/u01/app
[root@rac01 app]#
root@rac01
app]#
stat
oracle
File: ‘oracle’
Size: 84 Blocks: 0 IO Block: 4096 directory
Device: 811h/2065d Inode: 20628886 Links: 7
Access: (0775/drwxrwxr-x) Uid: ( 1001/ oracle) Gid: ( 1002/oinstall)
Access: 2018-01-07 18:22:42.813730118 +0800
Modify: 2018-01-07 18:24:27.418707810 +0800
Change: 2018-01-07 18:24:27.418707810 +0800
Birth: -
要修改 m时间,可以使用 touch来完成:
touch
-m -d
'2018-01-07 10:00:00' oracle
[root@rac01 app]# stat oracle
File: ‘oracle’
Size: 84 Blocks: 0 IO Block: 4096 directory
Device: 811h/2065d Inode: 20628886 Links: 7
Access: (0775/drwxrwxr-x) Uid: ( 1001/ oracle) Gid: ( 1002/oinstall)
Access: 2018-01-07 18:22:42.813730118 +0800
Modify:
2018-01-07 10:00:00.000000000 +0800
Change: 2018-01-07 18:26:21.145882983 +0800
Birth: -
平时,我们通过ls 看到的就是m时间:
[root@rac01 app]# ls --full-time
total 0
drwxr-xr-x 5 root oinstall 53 2018-01-07 09:18:47.417968129 +0800 grid
drwxrwxr-x 7 oracle oinstall 84 2018-01-07
10:00:00.000000000
+0800 oracle
作者:
bikong123
时间:
2018-1-7 18:41
像这样子学习,学不好就奇怪了!
大家都多多学习!
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2