In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces linux how to search according to the file time, the article is very detailed, has a certain reference value, interested friends must read it!
Search based on file time
Each file in the Linux file system has three timestamps
Access time (- atime): the last time the user accessed the file
Modification time (- mtime): the time when the content of the file was last modified.
Change time (- ctime): the time when the file metadata (metadata, such as permissions or ownership) last changed.
-atime,-mtime,-ctime is used as a time parameter in days. You can use + to indicate greater than, and-to indicate less than.
The code is as follows:
[root@localhost] # find. -type f-atime prints out the file [root@localhost ~] # find that was accessed exactly 7 days ago. -type f-mtime + print files with a modification time of more than 7 days [root@localhost ~] # find. -type f-ctime-prints files with a modification time of less than 7 days
Similar parameters include-amin (access time),-mmin (modification time), and-cmin (change time), in minutes.
Another beautiful feature of find is the-newer parameter. We can specify a parameter file for comparing timestamps, and then find all the files that are newer than the parameter file.
Find. -type f-newer file.txt
P find all files in the current directory that take longer to modify than file.txt.
The above is all the contents of the article "how linux searches based on file time". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.