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

    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0

    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.

    Regards
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,854
    Rep Power
    481

    use the find command


    Code:
    $ 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