Computing.Net > Forums > Linux > Space Control

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.

Space Control

Reply to Message Icon

Name: Jonathan
Date: December 12, 2003 at 04:38:55 Pacific
OS: Linux Red Hat 2.1 AS
CPU/Ram: Intel 256
Comment:

Hello,

I'd like to know, how I can make a shell that control a use of space in a directory.

ie. I have a database that use a determined directory to store files, but I want when 60% of directory is used, want delete all files in a directory

Thanks,
Jonathan



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: December 12, 2003 at 08:42:44 Pacific
Reply:

It's not really the directory that becomes full, more like the whole drive or partition that it resides on (unless of course you have a mountpoint in that directory).

You could create a simple script that checks disk usage and then deletes files depending on whether a specific size has been reached. Try a "du -hs /path/to/folder" to see if that will help.


0
Reply to Message Icon

Related Posts

See More


Add Devel Tools with up2d... LimeWire or gtk-gnutella?



Post Locked

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


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Space Control

User space to PCI Memory www.computing.net/answers/linux/user-space-to-pci-memory/25525.html

HD Space www.computing.net/answers/linux/hd-space/20788.html

Data is stroed where on a Linux server www.computing.net/answers/linux/data-is-stroed-where-on-a-linux-server-/8794.html