I have some programs on a server (Centos4-OpenVZ) that use a directory as temp directory - but pay no attention to the size as it grows.
I want to enforce a limit, such as that this folder cannot exceed 300MB.
I would use quota but OpenVZ does not support loop devices, that could be used to mount a file as a device.
Any other solutions? (Apart from scripting a periodic delete of files in the directory).
Editing the application's code to implement this functionality is not entirely out of the question (if it can be done easily and no other ways exist it's written in cpp) but I don't know where I would start if going that route.