By access, it means if you used cat, vim, less, or some other tool to read or display the content of the file.
This timestamp tells you when was the last time the file was accessed. What are Linux timestamps?Īny file in Linux has these three timestamps typically:Ītime stands for access time. find directory -mtime n1 -mtime -n2 -daystart -iname "*.In Linux, every file has some timestamps that provide some crucial analytics about when the file or its attributes were modified or changed.
To list the files edited between n1-n2 days ago for pdf files. It measures the time from the start of the current day instead of 24 hours ago. -atime is to specify the number of days.Įxample: find /home/priyanshu -iname "*.txt " -atime -1 -type f.Syntax:- find directory -iname "*.txt " -atime - n -type f to list files whose timestamp has been changed exactly n days ago – atime n.to list files whose timestamp has been changed less than n days ago – atime – n.It is an access timestamp, and it tells us the last time a file was read or accessed which means an application was used to open the file and read its contents. Method 2: Using atime (File access) attribute of the find command. -mtime is to specify the number of daysĮxample: find /home/priyanshu -iname "*.txt " -mtime -2 -print.-iname is the name of files and it could be a regex expression as well.directory is the directory name in which the files are to be searched.Syntax :- find directory -iname "*.txt " -mtime -n -print to list files whose timestamp has been changed exactly n days ago – mtime n.to list files whose timestamp has been changed less than n days ago – mtime – n.to list files whose timestamp has been changed more than n days ago – mtime +n.We can see the timestamps of the file within a certain range It is a modified timestamp it tells us when a file was last modified either by a program or a user and mtime also changes when the file’s contents are changed or modified. Method 1: Using -mtime(modification time) attribute of find command
How to Install and Set up Android Studio on Windows?.How to Install and Use Metamask on Google Chrome?.How to Change the Theme of Netbeans 12.0 to Dark Mode?.How to install requests in Python - For windows, linux, mac.How to Install and Run Apache Kafka on Windows?.
How to integrate Git Bash with Visual Studio Code?.How to Connect Two Computers with an Ethernet Cable?.How to filter object array based on attributes?.