Operating System - HP-UX
1834554 Members
3913 Online
110069 Solutions
New Discussion

How to find all files created within a date and TIME range

 
SOLVED
Go to solution
Mr Peter Kempner
Occasional Contributor

How to find all files created within a date and TIME range

I need to write a routine that gets a date and time range and then finds all files created or modified within that time.

In VMS this was v easy but Unix does not seem to be able to find files based on time (unless other files are used to base times on)

Any ideas on a way forward woould be much appreciated...
3 REPLIES 3
Paula J Frazer-Campbell
Honored Contributor

Re: How to find all files created within a date and TIME range

Hi

Have a look at Man find for atime ctime and mtime.


Paula
If you can spell SysAdmin then you is one - anon
U.SivaKumar_2
Honored Contributor

Re: How to find all files created within a date and TIME range

hi,
#man find
use options like -mtime and -ctime

regards,
U.SivaKumar
Innovations are made when conventions are broken
Peter Kloetgen
Esteemed Contributor
Solution

Re: How to find all files created within a date and TIME range

Hi Peter,

this is no problem in UNIX too:

man touch

--> touch time_format reference_file

you simply create a file with a time stamp you need, and after that you use the find- command to search for all files you need. You can use the logical and- operator for find to make a time frame.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping