I was reading this link, and noticed this bit at the bottom:
You can use this to your advantage in programs: have you ever wondered how you could hide a temporary file? Well, you could do the following…
But I don’t understand why hiding a temporary file from the OS would be desirable to a software program. Could anybody elaborate on this?
As @MarcB mentions, doing so would prevent other users from accidentally meddling with your file. However, it looks like there’s another hidden (no pun intended) advantage: this provides automatic garbage collection for your temp file. If your process dies for any reason while the file is still open, the OS will automatically delete the file and prevent
/tmpbloat.