[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Date scripting



On Thu, Mar 23, 2006 at 06:05:42PM -0000, 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?

check out "man find" and pay attention to the "-mtime" option. I think
it'll help solve your problem.

-- 
---- Fred Smith -- fredex fcshome stoneham ma us -----------------------------
    "Not everyone who says to me, 'Lord, Lord,' will enter the kingdom of
     heaven, but only he who does the will of my Father who is in heaven."
------------------------------ Matthew 7:21 (niv) -----------------------------

Attachment: pgpnGtrlossnz.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]