Date scripting

Christopher K. Johnson ckjohnson at gwi.net
Fri Mar 24 03:11:47 UTC 2006


Chris Norman wrote:

> Hi people,
> I need to check files to see how old they are.
>
> How can I do this from within a backup script?
>
> I need to see if they are over a month old, and if so delete them. How 
> do I get they're last modified stamp please?
>
> Cheers,
>
> Chris Norman
> <!-- chris.norman4 at ntlworld.com -->

You may be able to use tmpwatch to clean them out for you (man tmpwatch).
Otherwise using "stat -c%y file" may help.

Chris

-- 
   "Spend less!  Do more!  Go Open Source..." -- Dirigo.net
   Chris Johnson, RHCE #804005699817957




More information about the fedora-list mailing list