Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find files which are not modified in last 15 minutes

Highlighted
OScar123
Advisor

How to find files which are not modified in last 15 minutes

Hi Group,

 

I have a directory with lots of subdirectories created by a Software.

 

Many files are created in these sub directories and picked by another software.

 

I want to write a cron job to list the files which are not being picked up in last 15 minutes .

 

How can I use the find command to list down the files which have a timestamp of more than 15 minutes.

 

ie: . SYSTEM TIME-File TImestamp > 15 mins

 

Please help with find command or any other script.

1 REPLY
Dennis Handly
Acclaimed Contributor

Re: How to find files which are not modified in last 15 minutes

Unfortunately HP-UX's find only has granularity of days.  To get smaller, you need a reference file and you must be able to do date arithmetic to figure out what's 15 minutes ago.

 

touch MMDDhhmm ref_file

find path -type f ! -newer ref_file