I NEED TO DELETE A FILE THE LAST 3 MONTHS (directory)
opengeometry at yahoo.ca
Wed Aug 8 21:53:40 CEST 2001
On Wed, Aug 08, 2001 at 12:29:00PM -0700, Yoshie wrote:
> I have a doubt about select a any file and verify if this file have
> more 3 months. If file have more 3 months, i need to delete. Else to
> mantain in Directory.
Well Yoshie, this is again classic shell task. Play around with
$ find . -mtime +90 -type f | xargs rm
where you can add '-maxdepth 1' option to limit to current directory.
You can implement this in python, but requires more typing than I would
like in this 38C weather.
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
8 CPUs cluster, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Sc.
More information about the Python-list