It took me many years to figure out how to effective organize the directory structure on my harddisk. Even after decades in the IT industrie most people use their desktop (~/Desktop
) as a temporary directory. Why not using ~/tmp
?
This is a post about how my ~/work
directory and others are organized.
~/work/dev
- All subdirectories are Git repositories. So I can skip this directory completely for backup. This repositories are my own. But not all.~/work/dev
stores Git repositories which I have write access to. For example client repositories. Many of these folders (repositories) have atmp/
subdirectory, which is ignored by Git. For example~/work/dev/blog/tmp
, used for temporary files.~/work/extern
- Sometimes I have to clone a Git repositories which I don’t have access to. Most open-source software projects. For example when I want to keep it longer to read the source code. To distinguish own projects from non-own is good for generating Personal Annual Reports. You can better extract statistics out of a well organized directory structure.~/tmp
- Basically this is for everything else. And I mean everything. Escpecially for file transfers like browser downloads, SQL dumps, but also for notes, bills, etc. It’s temporary. From there I move the files to their final destination, or process and delete them afterwards. To cleaning up this directory from time to time is a good idea. To keep it clean as much as possible is an even better idea. The first years of using macOS this temporary directory was~/Downloads
. Which comes with macOS. I don’t want to rely too much on the pre-defined macOS directory structure.
My Dropbox is similar organized. There is also a ~/Dropbox/tmp
directory to sync temporary files. I still have issues organizing Dropbox in a perfect manner.
For years I also kept a ~/Software
directory. In the long-run it’s too expensive to keep it. Only for storing license keys, but not to keep the installers and binary files.