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