On Fri, 2004-02-20 at 17:35, YC Nyon wrote:
> Hi,
> 
> I want to delete files than are older than 1 week from a specific directory.
> Anyone mind to share their code? Can't anything on phpbuilder on this.
> 
> Regards
> Nyon

I have a bash script that I use:

#! /bin/bash
# call as: ./delete_old.sh directory days
# days is the age limit for files you want to keep (ie. 3, 5, 7, etc)

find $2 -type f -mtime +$1 | xargs rm

Ian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to