Where to place cache files and download files during program run

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the unix category.

Last Updated: 2022-05-26

Unix recommends specific directories for placing certain types of files:

A. Cache files

Aside: XDG is "X Desktop Group" - a set of standards. It seems to be used in non-desktop linux installs too.

B. Downloaded file

C. Temporary files