
Today was an incredible learning day whose biggest focus was doing a deep dive into Trino’s CBO and digging through explain plans, but I digress. And YES, I smell a blog post coming soon on that great topic.
Homebrew’s Cellar Location
I used homebrew to install an app and then needed to copy a jar file to its lib folder. Normally on Mac, the “cellar” folder (the place where homebrew drops software at) is at /usr/local/Cellar, but my new M1 Max processor laptop seemed to be DIFFERENT. man brew to the rescue!
--cellar [formula ...]
Display Homebrew´s Cellar path. Default: $(brew --prefix)/Cellar, or if
that directory doesn´t exist, $(brew --repository)/Cellar.
Viola!
$ brew --cellar
/opt/homebrew/Cellar
File Extended Attributes
Something weird showed up when I was double checking the file I just copied over. Can you see it?
$ ls -l t*
-rw-r--r-- 1 lester admin 708157 Jan 1 1970 tika-core-1.24.1.jar
-rw-r--r-- 1 lester admin 1336431 Jan 1 1970 tika-parsers-1.24.1.jar
-rw-r--r--@ 1 lester admin 6747310 Mar 8 19:10 trino-jdbc-371.jar
What’s that “@” sign doing there at the end of the file permissions? My good friend Google pointed me to this Apple Communities thread which let me know this means there are some extended attributes on this file. So what are they?
$ xattr -l trino-jdbc-371.jar
com.apple.metadata:kMDItemWhereFroms: bplist00?_[https://s3.us-east-2.amazonaws.com/software.starburstdata.net/371e/371-e/trino-jdbc-371.jar_Hhttps://s3.us-east-2.amazonaws.com/software.starburstdata.net/index.html
Gotcha, they slapped on some details about where the file came from. I took a look in my ~/Downloads folder and saw that ALL of those files had this.
$ xattr -l ~/Downloads/Vogel_TrailMap.pdf
com.apple.lastuseddate#PS: ??"b
com.apple.macl:
com.apple.metadata:kMDItemWhereFroms: bplist00?_Shttps://gastateparks.org/sites/default/files/parks/pdf/trailmaps/Vogel_TrailMap.pdf_Shttps://gastateparks.org/sites/default/files/parks/pdf/trailmaps/Vogel_TrailMap.pdf
A little more searching and it seems this has been out there for some time. Again, we all learn something new every day. EVEN ME; LOL! Following some thoughts from this thread, I was able to remove these extended attributes.
$ ls -l trino-jdbc-371.jar
-rw-r--r--@ 1 lester admin 6747310 Mar 8 19:10 trino-jdbc-371.jar
$ xattr -c trino-jdbc-371.jar
$ ls -l trino-jdbc-371.jar
-rw-r--r-- 1 lester admin 6747310 Mar 8 19:10 trino-jdbc-371.jar
Downtown Stacei Brown, linkedin.com/in/downtownsjbrown, let me know I could have just run…
$ brew ls jmeter
/opt/homebrew/Cellar/jmeter/5.4.3/bin/jmeter
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/backups/ (10 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/bin/ (184 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/docs/ (2094 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/extras/ (20 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/lib/ (119 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/licenses/ (150 files)
/opt/homebrew/Cellar/jmeter/5.4.3/libexec/printable_docs/ (73 files)
and yes… good old “which jmeter” would have reported back “/opt/homebrew/bin/jmeter” — I was mostly wondering why the Cellar wasn’t over at /usr/local/Cellar anymore