Berkeley CSUA MOTD:Entry 52420
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2018/07/19 [General] UID:1000 Activity:popular
7/19    

2009/1/20-26 [Computer/SW/Unix] UID:52420 Activity:low
1/20    I have a rather common shell-scripting problem, but I am not sure
        how to do it in csh/tcsh.  I want to check the ctime (last
        modified time) of a file.  If it is older than, let say, 1
        hours, do something, older than 3 hours, then do something +
        something else.  Any hints on how to do this?  do i need to
        convert it to epoch to perform such manipulation?  thanks
        \- find or perl
        \_ or stat(1)
        \_ find is an excellent tool for this, especially if you have
           access to a modern find.  Look at the -ctime and -mmin  options
           to it.
           \_ thanks. will work on "find."