4

My app is keeping files in /var/spool/myapp and that works fine. If my app crashes, then it might leave files in that directory.

Over time, this can add up to a lot of files, so I wondered if the /var/spool directory contents are automatically deleted on reboot, or after a period of time (sort of like /var/tmp)?

2 Answers 2

1

Per the Filesystem Hierarchy Standard, /var/spool is the directory for data which awaits further processing e.g. printer queues and other queued work. Each different spool has its own subdirectory. It is not cleaned periodically or on reboot; usually contents get deleted once they have been processed by the relevant service.

1

This is not a temporary directory per se, it's not cleaned up automatically by default by any distro that I'm aware of.

You could use tmpwatch to do that or write your own routine using crontab.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.