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

    Join Date
    Mar 2011
    Posts
    1
    Rep Power
    0

    Aix sh script to see if file got modified today


    Hi,

    I am a newbie to aix scripting. I am trying to create a simple sh script to flag if a given file was created today's date. This script will run daily to check this so I can't hard code today's date. I've seen similar posts about this but not exactly for this and can't piece it together. I've seen other posts commenting that in UNIX, its not easy getting the create date, so the modified date will do fine. Any help would be greatly appreciated.

    Thanks!
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    858
    Rep Power
    388

    Cool


    Try this:
    Code:
    touch -t "`date +%Y%m%d`0000" tmpFile
    find ./* -prune -newer tmpFile -type f
    rm tmpFile
    Last edited by LKBrwn_DBA; March 10th, 2011 at 11:26 AM.

IMN logo majestic logo threadwatch logo seochat tools logo