1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Rep Power

    Count the files between two dates / times (Urgent)

    Hi All,
    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.

  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power

    use the find command

    $ find path/to/top/node -name 'o*.out' -ctime xxx +ctime yyy -print
    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.)
    Last edited by b49P23TIvg; August 24th, 2011 at 06:34 PM. Reason: close )

IMN logo majestic logo threadwatch logo seochat tools logo