Categorized | News

Deleting Old Files: variations

Posted on 26 September 2002 by Demian Turner

Here is another way to delete old files, this time using a script. The script will delete files older than the most recent KEEP files.

Example: If you set KEEP = 12, the 12 most recent files will be kept and everything older deleted.

How to use:
1. Click \’read more\’ to view the script, copy and paste it into a file named \’\’
2. make the file executable with \’chmod 755\’
3. change the constants KEEP, DIRLOC and FILEEXT to suit your needs
4. run the script by typing ./

Bookmark and Share

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up