News for hackers. Stuff that matters.
Re:Look up macOS system binaries by qalmakka on Tuesday July 22, 2025 @04:58AM (#44644710)
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
Re:Look up macOS system binaries by curt15 on Tuesday July 22, 2025 @07:24AM (#44645553)
On 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.
Re:Look up macOS system binaries by WesolyKubeczek on Tuesday July 22, 2025 @07:57AM (#44645783)
Except 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".

Re:Look up macOS system binaries by Svetlitski on Tuesday July 22, 2025 @08:42AM (#44646169)
When 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.
Re:Look up macOS system binaries by adidalal on Tuesday July 22, 2025 @09:00AM (#44646345)
There'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

[2] https://github.com/nrlquaker/homebrew-createzap

[3] https://freemacsoft.net/appcleaner/

[4] https://itsalin.com/appInfo/?id=pearcleaner

Re:Look up macOS system binaries by jbc1 on Tuesday July 22, 2025 @09:02AM (#44646358)
Appcleaner does this. One of first installs on a fresh macos.
Re:Look up macOS system binaries by pjmlp on Tuesday July 22, 2025 @09:07AM (#44646409)
It 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.

Re:Look up macOS system binaries by qalmakka on Wednesday July 23, 2025 @03:11AM (#44656515)
But 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

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

Re:Look up macOS system binaries by pjmlp on Wednesday July 23, 2025 @03:16AM (#44656549)
Those "standards" are followed upon various Linux distributions with some degree of flexibility in what they actually mean.
Re:Look up macOS system binaries by mistersquid on Tuesday July 22, 2025 @09:09AM (#44646425)
> 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.

Re:Look up macOS system binaries by delta_p_delta_x on Tuesday July 22, 2025 @10:20PM (#44655151)
> 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?

Re:Look up macOS system binaries by qalmakka on Wednesday July 23, 2025 @03:06AM (#44656485)
What'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). 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)