← Back to context

Comment by pxc

12 hours ago

Isn't that pretty much just Windows? That basically never occurs on Linux and it's not common on macOS, either. All the garbage I have on my work computer (a Mac) in ~/Documents is stuff that OneDrive synced over from when I used to have a Windows computer there. (If I could turn the OneDrive feature that takes over ~/Documents and ~/Downloads, I would.)

Linux software is notorious for spewing crap all over the user's home directory. Delete everything inside your /home/name and see how well the system still works. On iOS/iPadOS nothing happens other than not having the documents you saved in there.

I'm not sure there even is a good place where programs can store their internal system files without requiring root other than mixed in with the user Home.

  • Yes and no. Some older conventions for dotfiles are a bit messy in that they're not necessarily contained under top-level directories like ~/.config or ~/.local, but the hijacking of non-hidden directories for contents unrelated to their purposes, like using ~/Documents for game saves, is basically unheard of (except for some ports of Windows games that retain this bad habit).

    > On iOS/iPadOS nothing happens other than not having the documents you saved in there.

    That is, frankly, a ridiculous test for the issue under discussion. Even if everything was stored under a top-level subdirectory set aside for application data in a perfectly orderly way, nuking $HOME would still break things.

    Besides all that, hidden directories in the root of ~ are conventional¹ places to store application config files and so on, and can't be mistaken for conventional places to store documents. On most Linux-based operating systems, the conventional place to store documents is (obviously) ~/Documents, which is created ahead of time for all users. That folder doesn't generally end up polluted with things that aren't documents.

    > On iOS/iPadOS nothing happens other than not having the documents you saved in there.

    If you delete /var/mobile or any of the things that $HOME points to in the context of some app, you'll definitely lose app settings.

    The app sandboxing on iOS does something nice by sort of forcing app configuration data to live within conventional directories, but none of that is captured in the "what if you delete ~" test. (The fact that $HOME isn't really directly exposed to the user sort of does; the local files you're comparing to $HOME on Linux are actually $HOME/Media on iOS.)

    ----

    1: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s08.htm...

    2: https://www.theiphonewiki.com/wiki//private/var/mobile