4 ms·
To me its a sane choice on my own single-user machine. I used to create a top level `/data` directory to put my stuff into (before Android was widespread :) ).
by Linux-Fan 2y ago
To me its a sane choice on my own single-user machine. I used to create a top level `/data` directory to put my stuff into (before Android was widespread :) ). Nowdays, my data resides in `/data/main`. This scheme has served me well for more than 10a and through various OS migrations (Windows -> Ubuntu -> Debian).
I don't want to have all this `.cache` and similar stuff to take up my expensive backup storage, nor do I want to waste time cleaning up after all the applications that create/expect files in `$HOME` or think this a sensible place to put executable files. I don't want arbitrary applications (heard of tracker?) to start indexing my files and waste CPU on that etc.
Also I don't believe in /home being portable across multiple Linux distributions because e.g. different application versions might require config files to be migrated. Hence I opt for `/data` that can safely be shared across multiple systems because it contains actual data and not some OS-related state files.
On multi-user systems, the `/data` approach doesn't scale. There, I prefer to do just as boomboomsubban writes: I create a subdirectory in $HOME (usually, I call it `wd`, the "working directory") and treat that like my local `/data/main`. For large/temporary files (e.g. application downloads etc.) I add a `$HOME/large` directory to keep the `wd` reasonably small in such cases such that I can again include it in backups without having to worry about the size.
YMMV