housekeeping script to keep jpegs manageable

This crops up periodically and it surprises me that with all the free tools you get with linux that there’s nothing (that I can find, at least) that will allow me to keep a folder tree within a manageable size. I did write a shell script to do this but I’ve lost it. With a … Continue reading “housekeeping script to keep jpegs manageable”

This crops up periodically and it surprises me that with all the free tools you get with linux that there’s nothing (that I can find, at least) that will allow me to keep a folder tree within a manageable size. I did write a shell script to do this but I’ve lost it. With a webcam using motion often triggering over 5000 images a day (four times that if it’s windy) I need to have some automated housekeeping to purge the older images.

I think what I had before was something that had a user-definable value (e.g. 5GB) and it would iteratively recurse a directory tree, deleting the older directories until the space taken up dropped below the threshhold. There are problems with this (e.g. accidentally Tagging or touching an old jpeg) that causes the directory time stamp to be updated. But all these thousands of jpegs are piling up and I’ll have to address this sometime soon.