stat:查看文件时间参数
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 exitstat:查看文件时间参数的更多相关文章
- lftp查看文件时间与登录服务查看文件时间相差8小时
第一步,校正VPS时区设置: rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 第二步,修改FT ...
- linux下查看和修改文件时间
一.查看文件时间及相关命令 1.stat查看文件时间 [root@web10 ~]# stat install.log File: "install.log" Size: 3338 ...
- 【linux】如何查看文件的创建、修改时间
本篇博文旨在介绍Linux下查看文件时间的方法:并介绍如何使用touch指令来进行文件时间的创建以及修改 如何查看文件的时间信息利用stat指令查看文件信息 三种时间的介绍ATime ——文件的最近访 ...
- Linux的3个文件时间
文件的三个时间相信大家都已经很熟悉windows操作系统了,当我们在windows系统下创建一个文件时,系统同时会为这个文件建立相关的参数去描述这个文件,如图: 这些参数包括文件的大小,文件类型,位置 ...
- Linux 文件时间记录属性 调优
Linux 文件时间属性介绍 atime:(access time)显示的是文件中的数据最后被访问的时间,比如系统的进程直接使用或通过一些命令和脚本间接使用.(执行一些可执行文件或脚本) mtime: ...
- linux文件时间详细说明
目录 一:文件时间信息 2 文件时间详细说明 一:文件时间信息 1 文件时间信息分类: 三种时间信息 文件修改时间: mtime 属性修改时间: ctime 文件访问时间: atime 2 查看文件时 ...
- Linux中用stat命令查看文件时3个时间点解析
有些时候,我们需要在Linux中使用stat命令来查看文件的详细信息.另外联想下,ls -l命令显示的是什么时间,touch命令修改文件的时间戳,修改的又是什么时间?在这里我们一起来试验下. 首先,我 ...
- linux 下查看文件修改时间,访问时间,状态改变时间
http://blog.sina.com.cn/s/blog_6285b04e0100f4xr.html 查看文件时间戳命令:stat awk.txt File: `awk.txt' Size: 20 ...
- Linux如何查看文件的创建、修改时间?
Linux如何查看文件的创建.修改时间? 利用stat指令查看文件信息 三种时间的介绍 ATime --文件的最近访问时间 只要读取时间,ATime就会更新 MTime --文件的内容最近修改的时间 ...
随机推荐
- Mybatis数据基本操作
<insert id="doCreate" parameterType="News"><!--添加数据--> INSERT INTO n ...
- JS正则之---HTML版
话不多说 上代码 <html><head> <meta http-equiv="Content-Type" content="text/h ...
- Python 并发网络库
Python 并发网络库 Tornado VS Gevent VS Asyncio Tornado:并发网络库,同时也是一个 web 微框架 Gevent:绿色线程(greenlet)实现并发,猴子补 ...
- ELK视频下载
Elasticsearch , Logstash, Kibana 相关视频下载地址:Beats.Elastic Stack.ElasticSearch.Kibana.Logstash下载地址:链接:h ...
- O014、云计算与OpenStack
参考https://www.cnblogs.com/CloudMan6/p/5334760.html 云计算 基本概念 所有的新事物都不是突然冒出来的,都有前世和今生.云计算也是IT技术不断发 ...
- bzoj 4722 由乃
bzoj 先考虑一种简单的情况,即这个区间是否有相同的数,因为值域大小为1000,那么当区间长度\(>1000\)时,根据鸽巢原理,一定会有两个相同的数,这时候可以直接输出Yuno 进一步的,对 ...
- 02 Python数据结构的性能分析
一.列表: - python 的设计者在实现列表数据结构的时候有很多选择.每一个这种选择都可能影响列表操作的性能.为了帮助他们做出正确的选择,他们查看了最常使用列表数据结构的方式,并且优化了实现,以便 ...
- SQL SERVER 查询被锁的表、解锁表
-- 查询被锁的表select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName f ...
- dedecms织梦移站后替换数据库中文件路径命令
1.系统设置路径替换 update dede_sysconfig set value='http://afish.cnblogs.com' where varname='cfg_basehost'; ...
- HTTP与TCP的区别和联系(转)
https://www.cnblogs.com/baizhanshi/p/8482612.html