View Single Post
Old 10-19-2003, 10:56 AM  
Pharaoh
Senior Member
 
Join Date: Sep 2003
Posts: 117
Post [REQ] Auto-delete script

I am in need for a script which will automatically delete old releases from a dir (and its' subdirs) when this dir (including its' subdirs) reach a specific size.

For example:
let's say I have the following dirs:

DIR1
--SUBDIR1
----CD1
----CD2
--SUBDIR2
--SUBDIR3

and I want that the total size of DIR1 (including all the other subdirs, and CD1/CD2) not exceed 10g.
I need a script which will check all the subdirs below DIR1 for the oldest release and delete it to free enough space so the total size will never exceed 10g.

Thanks in advance for any assistance!
Pharaoh is offline   Reply With Quote