StoCS is a software script that manages and ensures configurable levels of free disk space.
The WARN threshold allows you to initiate a configurable action such as an alarm, message, or dialog depending on your preferences. The FDEL threshold, on the other hand, allows you to configure a deletion limit. Finally, the LOWL threshold lets you specify the dimension you want to reach after deletion. It's important to note that LOWL must be less than WARN and FDEL.
StoCS works with various threshold units including total number of files and/or subdirectories, total dimension of controlled folders (Byte, Kbyte, Mbyte, etc.), % of free space on the unit, and the maximum age of files and/or subdirectories. In the latter case, LOWL isn't used since all files and subdirectories that exceed the maximum age are deleted.
You can use StoCS via a config file or command line parameters. The command line parameters override the config file values, allowing for more flexibility. However, StoCS doesn't implement loop functionality, so you'll need to use cron or a similar tool to run the software at set intervals.
To install StoCS, simply copy it to /usr/local/bin and stocs.conf to /usr/local/etc. You can then add the software to a cron.hourly or crontab file, running it every hour based on the configuration in stocs.conf. The output will be logged in /var/log/stocs.log, providing you with valuable insights into the software's performance and usage.
Version 1.2: N/A