Computing.Net > Forums > Unix > Limit directory size script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Limit directory size script

Reply to Message Icon

Name: WebSoda
Date: May 16, 2003 at 09:06:34 Pacific
OS: ?????
CPU/Ram: ???????
Comment:

Thanks to all in advance

I was wondering if anyone had a script that could be ran every few hours that would LIMIT the size of a directory. Here is the logical flow:

-Get total size of DIRECTORY
-If DIRECTORY SIZE > 250MB Then
-List all files in directory from OLDEST to NEWEST
-Do a DIR on the directory and delete the first file found (which would be the oldest)
-Loop back to Get total size of DIRECTORY to check again
-End If
-If DIRECTORY SIZE = 250MB Then
-End If



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


comm command checking date in Shell sc...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Limit directory size script

Find a max file size script www.computing.net/answers/unix/find-a-max-file-size-script-/3955.html

Terminate paging after x number of msgs www.computing.net/answers/unix/terminate-paging-after-x-number-of-msgs/3400.html

[Script] Filesize checking - HELP! www.computing.net/answers/unix/script-filesize-checking-help-/6847.html