Lets assume my current directory is /Applications
and it contains all my apps. Lets say I want to know the bundle identifier for Google Chrome:
$ mdls -raw -name kMDItemCFBundleIdentifier 'Google Chrome.app'
com.google.Chrome
Now let’s use that to locate the app:
$ mdfind kMDItemCFBundleIdentifier = com.google.Chrome
/Applications/Google Chrome.app
Now lets try the same for Tor Browser Bundle. First, get the bundle identifier:
$ mdls -raw -name kMDItemCFBundleIdentifier TorBrowser.app
org.mozilla.tor browser
Then, locate the app:
$ mdfind kMDItemCFBundleIdentifier = org.mozilla.tor browser
Nothing. I likely need to quote it:
$ mdfind kMDItemCFBundleIdentifier = 'org.mozilla.tor browser'
Nope, still nothing. Lets try something else:
$ mdfind kMDItemCFBundleIdentifier = 'org.mozilla.tor'
$ mdfind kMDItemCFBundleIdentifier = "org.mozilla.tor browser"
$ mdfind kMDItemCFBundleIdentifier = org.mozilla.tor\ browser
$ mdfind kMDItemCFBundleIdentifier = "org.mozilla.tor\ browser"
$ mdfind kMDItemCFBundleIdentifier = 'org.mozilla.tor%20browser'
$ mdfind kMDItemCFBundleIdentifier = 'org.mozilla.tor+browser'
$ mdfind kMDItemCFBundleIdentifier = 'org.mozilla.tor_browser'
Nothing works. This is the only app I ever had this issue with, and the only one I ever saw with a space in its bundle identifier. How can we reference it?
\`
? Or"
quotes?