In our production servers(AIX)there are multiple API calls which made every micro seconds and those API call details will be appended in an log called ins.log. On the other hand, we are using this data from the log to publish in a dash board so we will take the log file which got updated in the last 5 minutes using the command:
find . -type f -name ins.log -mmin -5
Without -mmin
, the command finds the file, and you could see the modification time of the file is recent:
$ date
Tue Aug 29 18:34:54 +08 2023
$ find . -type f -name ins.log | xargs ls -l
-rw-r--r-- 1 123456 123grp 74356 Aug 29 18:34 ./ins.log
But when I add -mmin
it doesn't find the file.
$ date
Tue Aug 29 18:35:41 +08 2023
$ find . -type f -name ins.log -mmin -60
For example
- if the ins.log get updated at 3:15 and the system date is 3:15 and the script runs at 3:15 then the ins.log which updated at 3:15 not coming in the output