3 ms·
One thing that always grinds my gears is how the macOS filesystem is a hodgepodge of stuff thrown around without any apparent logic (similarly to Windows), whic
by qalmakka 1y ago
One thing that always grinds my gears is how the macOS filesystem is a hodgepodge of stuff thrown around without any apparent logic (similarly to Windows), which is in stark contrast to the also apparently illogical but standardised hierarchy of Linux and the BSDs. I do understand their need to keep the /System directory around for the Classic days, but /usr? /sbin? The only "fixed" file should be /usr/bin/env, all the rest should be in /System. The mix of classic UNIX directories and Classic is annoying
- curt15 1y agoOn the other hand, their /Applications directory is genius. No need for databases to track which files belong to which application. Everything belonging to an application resides in its subdirectory of /Applications. Installing and removing software becomes incredibly simple.
- WesolyKubeczek 1y agoExcept stuff in /Library/Application Support. Oh, and /Library/Extensions. Oh, and /Library/DriverExtensions. Oh, and /Library/LaunchAgents. And /Library/LaunchDaemons. Also /Library/Perl (this is Apple-provided) and /Library/TeX (this is not, this is MacTeX). And /Library/Developer. Also, the dread of "removal instructions" that include stuff like "go through these directories and delete things that look like they belong to this software".
- Svetlitski 1y agoWhen available I prefer installing applications via brew as casks, since at least this way if I decide to uninstall it later brew will take care of deleting all of these associated directories. I remember using an app called AppZapper several years ago which did this but for arbitrary applications. No idea if it’s still around/maintained.
- adidalal 1y agoThere's `brew uninstall --zap $application`[1], and there's pretty decent coverage, but it's by no means comprehensive. If you feel inclined to contribute, the process is quite streamlined, and there's a helper script[2]. I used Appcleaner[3] for many years, and it's still perfectly serviceable I'm keeping my eye on Pearcleaner[4], which is additionally open-source and written in Swift. [1] https://docs.brew.sh/Cask-Cookbook#stanza-zap https://docs.brew.sh/Cask-Cookbook#stanza-zap [2] https://github.com/nrlquaker/homebrew-createzap https://github.com/nrlquaker/homebrew-createzap [3] https://freemacsoft.net/appcleaner/ https://freemacsoft.net/appcleaner/ [4] https://itsalin.com/appInfo/?id=pearcleaner https://itsalin.com/appInfo/?id=pearcleaner
- jbc1 1y agoAppcleaner does this. One of first installs on a fresh macos.
- pjmlp 1y agoIt isn't as if UNIX is any piece of fine art in filesystems design, especially clear to everyone that has used multiple commercial UNIXes. People should stop worshiping UNIX System V, while ignoring the chaos that came later with the explosion of UNIX clones. There is a reason why the UNIX authors then went on designing Plan 9, followed by Inferno, while trying to fix what they percevied as design flaws in UNIX, from filesytem, security model, process execution model, and userspace languages.
- qalmakka 1y agoBut at least there's a standard that specifies what the directories are supposed to mean: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html I won't argue with your point because you are right, I was arguing that at least Linux and the BSDs, despite their stupid hierarchy, at least have standards that assign those directories specific functions. This is in stark opposition with Windows and macOS, where across the years stuff has been chucked basically everywhere (especially on Windows, which is the worst offender in this regard) without a lot of care about what was being put where. On macOS you can find binaries inside frameworks, stuff in /usr/bin, stuff in /sbin, stuff under System, ... and for quite a long time there really wasn't any apparent logic behind it except that it was the most convenient place to put it, similarly on Windows where some 64-bit programs chuck stuff in the 32-bit program application directory just because
- pjmlp 1y agoThose "standards" are followed upon various Linux distributions with some degree of flexibility in what they actually mean.
- mistersquid 1y ago> The only "fixed" file should be /usr/bin/env, all the rest should be in /System Modern macOS separates things that are protected by System Integrity Protection and are unalterable (checksummed) in /System. Everything else, including user-customizable system components go in /Library. Modern macOS file structure is highly organized and easy to reason about if you have even a beginner’s understanding of its security implementation.
- delta_p_delta_x 1y ago> also apparently illogical but standardised hierarchy of Linux and the BSDs Hmm. /usr/bin /usr/sbin /bin /opt/bin ~/bin ~/.local/share/bin ~/opt/bin /include /lib/include /usr/include /usr/lib/include /usr/lib/clang/include And many more. Some directories are symlinks to another. Some of these directories do not exist on some distributions. Why are Linux people always so misguided and haughty?
- qalmakka 1y agoWhat's so hard to understand about "apparently illogical but standardised"? I never said it was beautiful, I said that despite being dumb [^1] at least there is a standard for it (https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html). So yeah here are nonsensical directories like /opt, but at least they have a clear purpose, compared to the "well who cares, chuck it in there" approach NeXT/Apple had when tossing stuff around (sure, they've now "improved" that with SIP nowadays, but it's still a mess IMHO) [1]: for instance, "usr" contains libraries only due to the first PDP7 at bell labs having two disks, the first mounted as /, the second as /usr (user). When they ran out of space under /, they replicated the filesystem structure in their user disk, thus the birth of /usr/bin and the like. When /usr got too cluttered they created /home (or /usr/home, don't recall which)