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 --文件的内容最近修改的时间 ...
随机推荐
- Kick Start 2019 Round B Energy Stones
对我很有启发的一道题. 这道题的解法中最有思维难度的 observation 是 For simplicity, we will assume that we never eat a stone wi ...
- java-selenium上传
一.sendkeys()上传 HTML源码 <td>sendkeys上传</td> <div id='pf'><input type='file' id='p ...
- Git上传相关资料
############ssh key及 配置信息############# 设置Git的user name和email: $ git config --global user.name " ...
- leecode刷题(23)-- 合并两个有序链表
leecode刷题(23)-- 合并两个有序链表 合并两个有序链表 将两个有序链表合并为一个新的有序链表并返回.新链表是通过拼接给定的两个链表的所有节点组成的. 示例: 输入:1->2-> ...
- 勒索病毒[recoverydata54@cock.li].harma,这样恢复文件。
还没有从搬新家的喜悦中恢复回来,突然有一天发现,自己的1T的硬盘的历史遗迹里面的文件都不能打开了.尤其是孩子们的珍贵照片. 这可让我着急了好几天.过了几天我才知道,原来是有天晚上,4周岁的儿子自己不知 ...
- Spark报错java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
Spark 读取 JSON 文件时运行报错 java.io.IOException: Could not locate executable null\bin\winutils.exe in the ...
- 重装系统win10教程(激活系统、office下载、分区)
看见有很多小白不知道怎么重装系统,故而在此特别做一个详细教程,大家按照教程做就可以了,也不用去电脑店浪费钱重装系统,在此安装的win10系统,现在win10系统已经是最好的Windows系统了,如果没 ...
- ThinkPHP依赖注入
D:\wamp64\www\thinkphp5.1\tp5.1\application\index\controller\Demo1.php文件 <?php namespace app\inde ...
- nginx服务学习第二章
nginx.config文件中字符串不显示高亮 nginx服务搭建完成后,查看nginx.config的时候发现没有高亮字符,要想配置文件出现高亮方便观看,需要修改一些配置文件,修改步骤如下: # m ...
- filebeat收集nginx的json格式日志
一.在nginx主机上安装filebeat组件 [root@zabbix_server nginx]# cd /usr/local/src/ [root@zabbix_server src]# wge ...