Where to save your temporary files on macOS
Inspired by this article showing how to change where macOS saves your screenshots, here’s a trick of my own.
I often find myself wanting to save things that I just want temporarily. Tomorrow I won’t need it any more, but maybe I just want to download an image to edit and re-upload it, or download a WAD from the idgames archive. MacOS provides a “Downloads” folder, but such folders have a habit of filling up with random cruft over months; often I only want things for less than a day.
Fortunately, like every Unix-like system, MacOS provides a temporary directory, which files will be automatically deleted from. But it doesn’t expose this in the UI. Fortunately it’s easy to do so.
Open Finder, and choose “Go to Folder…” from the “Go” menu:

Then type “/tmp” and click “Go”:

The temporary directory will now be shown; it will probably already contain some things you shouldn’t need to worry about. Click “Add to Sidebar” from the “File” menu, and you should see “tmp” now appears in the Finder and any file dialogs.
Now, whenever you save a file from the Internet, if you don’t think you’re likely to keep it longer than a day, just save it to “tmp”. Similarly if you want to open a file from inside an application, you can just navigate to “tmp” to find the file you saved. Just remember that anything in there will get automatically deleted!
