July 11th, 2011, 05:45 AM
Count the files between two dates / times (Urgent)
Need your urgent help.
I need to count the concurrent program's output files and log files generated e. g. between "01-APR-2010 0700" hrs to "15-APR-2010 19:00" Hrs on OS (unix) level. I have many kind of files in this directory e.g. filename.txt, filename.err, filename.out and some other files,
I need to count files only name starting with "o" and file extension is ".out" and creation date is between "01-APR-2010 0700" hrs to "15-APR-2010 19:00" Hrs
( Please note that i do not have data for these requests in my fnd_concurrent_requests table, it is purged already)
Please help to provide script / steps to achive this.
Its urgent. Please help.
August 24th, 2011, 06:31 PM
use the find command
Your command will be something like this. find has an option to choose time based on that of some file in the directory. That might be easier than understanding the gazillion time format specifications. Good luck. (oh, if you just need the count you can pipe the output to wc -l after you're sure you've got the right file set.)
$ find path/to/top/node -name 'o*.out' -ctime xxx +ctime yyy -print
Last edited by b49P23TIvg; August 24th, 2011 at 06:34 PM.
Reason: close )