stat:查看文件时间参数
2024-08-31 19:27:12
Linux 系统中,每个文件主要拥有 3 个时间参数,分别是文件的访问时间、数据修改时间以及状态修改时间:
- 访问时间(Access Time,简称 atime):只要文件的内容被读取,访问时间就会更新。例如,使用 cat 命令可以查看文件的内容,此时文件的访问时间就会发生改变。
- 数据修改时间(Modify Time,简称 mtime):当文件的内容数据发生改变,此文件的数据修改时间就会跟着相应改变。
- 状态修改时间(Change Time,简称 ctime):当文件的状态发生变化,就会相应改变这个时间。比如说,如果文件的权限或者属性发生改变,此时间就会相应改变。
Usage: stat [OPTION]... FILE...
Display file or file system status. -L, --dereference follow links
-Z, --context print the SELinux security context
-f, --file-system display file system status instead of file status
-c --format=FORMAT use the specified FORMAT instead of the default;
output a newline after each use of FORMAT
--printf=FORMAT like --format, but interpret backslash escapes,
and do not output a mandatory trailing newline.
If you want a newline, include \n in FORMAT.
-t, --terse print the information in terse form
--help display this help and exit
--version output version information and exit
stat /etc/hosts
Access: -- ::51.110015002 – --> find atime
Modify: -- ::49.508018898 – --> find mtime
Change: -- ::49.508018898 – --> find ctime
Usage: stat [OPTION]... FILE...
Display
file
or
file
system status.
-L, --dereference follow links
-Z, --context print the SELinux security context
-f, --
file
-system display
file
system status instead of
file
status
-c --
format
=FORMAT use the specified FORMAT instead of the default;
output a newline after each use of FORMAT
--
printf
=FORMAT like --
format
, but interpret backslash escapes,
and
do
not output a mandatory trailing newline.
If you want a newline, include \n
in
FORMAT.
-t, --terse print the information
in
terse form
--help display this help and
exit
--version output version information and
exit
最新文章
- 谷毅(WingKu)横空出世
- membership 启用 roleManager 抛出异常:未能加载文件或程序集MySql.Web
- HD1847-(博弈论??)
- 2017.1.8a版给信息源新增:max_len、max_db字段
- dll 学习(一)
- amoeba-mysql配置安装(收集整理)
- 图片轮换cycle插件的运用
- VC++中操作XMLWin32实例
- Java 访问控制符
- Qt mac QMYSQL(动态加载插件QPluginLoader的用法)
- Storm构建分布式实时处理应用初探(转)
- docker 中国站 www.dockerpool.com 报价图片下载
- HDU 4831 Scenic Popularity (段树)
- VMware Mac OS中无法找到适应的分辨率的解决办法
- 20个开发人员非常有用的Java功能代码
- SqlHelper工具类
- Java解决Hanoi问题
- 来了解一下Mysql索引的相关知识:基础概念、性能影响、索引类型、创建原则、注意事项
- emacs org-mode文件转html文件
- 函数调用的方法一共有 4 种,call,apply,bind
热门文章
- round函数——银行家舍入算法
- 为什么要学习Hive
- ajax怎么打开新窗口具体如何实现
- 喝奶茶最大值(不能喝自己班级的)2019 Multi-University Training Contest 8--hdu杭电第8场(Roundgod and Milk Tea)
- [BZOJ1576] [BZOJ3694] [USACO2009Jan] 安全路径(最短路径+树链剖分)
- p24 map 之 golang基础
- python-day10(正式学习)
- Hive 教程(八)-hiveserver2
- css--内凹圆角
- SpringBoot + Vue + nginx项目部署(零基础带你部署)