How to find files which are not modified in last 15 minutes (459 Views)
Reply
Advisor
OScar123
Posts: 25
Registered: ‎05-12-2011
Message 1 of 2 (459 Views)

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.

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,888
Registered: ‎03-06-2006
Message 2 of 2 (451 Views)

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

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation