I noticed that in macOS, the
/usr/local/Cellar folder contains binaries installed using Homebrew, and that
/usr/local/opt has symbolic links to a bunch of those binaries. I haven't used symbolic links much, but as I understand it, the purpose of them is to create a link in a convenient location to a file/folder that acts as a copy of that file/folder, without having to move that file/folder from its original location.
So my questions are:
Am I correct in my understanding of symbolic links there?
If so, why would you create symbolic links in one folder (
/usr/local/opt) to binaries in another folder (
/usr/local/Cellar) that is at a similar location/depth in the file structure? Under what circumstances would you use these symbolic links where you couldn't just use the binaries?