Date scripting

fredex fredex at fcshome.stoneham.ma.us
Fri Mar 24 02:28:54 UTC 2006


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 at 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) -----------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060323/c8e347a4/attachment-0001.sig>


More information about the fedora-list mailing list