惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

博客园 - 四季皆春

html设置某个元素固定在页面, 不随滚动条移动 通过Redis防止数据重复 Mysql语句where中设置多个查询条件 Jquery插件 dataTable设置点击表格指定的列实现升序降序排序功能 JavaScript中为JSON对象动态添加属性的四种方法 CSS设置指定某个区域div出现滚动条、滚动框 Nginx配置成系统服务及环境变量配置 jquery监听表单输入变化-调用函数 javaScript正则匹配全部字符 Linux下PHP安装Redis扩展 mysql语句使用正则过滤字段 Bootstrap模态框使用WebUploader点击失效问题 - Bootstrao模态框弹出后内置js函数未起作用-F12后又起作用 百度开发-文件上传插件- Web Uploader js根据某个日期(年-月-日)添加指定的天数 ci框架nginx隐藏 index.php Docker配置阿里云镜像加速服务 Redis配置登录密码并使用认证密码登录 Redis常用命令 Redis查看当前连接数 & 客户端连接信息 Redis查看参数值 centos8报错错误:为 repo 'appstream' 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist
linux查看文件最后的修改时间
四季皆春 · 2024-04-23 · via 博客园 - 四季皆春

文件时间主要包括三种:访问时间、修改时间和更改时间。

执行:

# stat filename.txt

1、查看文件的修改时间atime

访问时间指的是文件最后一次被访问的时间。要查看文件的访问时间,可以使用stat命令,并结合awk命令来提取时间信息。示例如下:

stat -c %x redis.log

2、查看文件的修改时间mtime

修改时间是指文件最后一次被修改的时间。要查看文件的修改时间,同样可以使用stat命令,示例如下:

stat -c %y redis.log

3、查看文件的更改时间ctime

更改时间是指文件元数据最后一次被修改的时间。同样使用stat命令,示例如下:

stat -c %z redis.log

4、综合示例:查看文件的所有时间信息

如果要一次性查看文件的所有时间信息,可以使用如下命令:

stat redis.log

该命令会输出文件的访问时间、修改时间、更改时间等详细信息。