The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Don’t flush the /tmp directory

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

The /tmp directory on your system is actually a symlink to /boot/var/tmp. The fact that it’s always cleaned out by a fresh boot may make it seem like a virtual directory, but it is indeed physical.

The contents of /tmp are erased automatically at boot time by a function in the system’s Bootscript. If for some reason you’d like for this not to happen (e.g. you might be creating a logging script that stores files here, which is probably not the best idea), place a blank file called .noerase in this directory and the system will leave its contents untouched at boot time. It will now be your responsibility to manually clear out any temp files that land here.

Posted in Miscellaneous


(comments are closed).