1

I have the zsh in Ventura OS. I know that I have already installed the following apps:

  • Books.app (which came already in the system)
  • Brackets
  • MAMP (Package for MySQL, Apache and PHP)
  • Adobe Photoshop

I want to see the output, the version running, through commands in the terminal. The spotlight is set to look for all directories, including Applications. How do I know if an application is installed and which version is it?

I typed the following and you can see the outcome. To look for a particular application you need to type all the path, right? I dragged them from the finder directory (I learned that in a video).

macsito@Macsitos-iMac-Pro ~ % /Applications/MAMP/MAMP.app -v
zsh: permission denied: /Applications/MAMP/MAMP.app

macsito@Macsitos-iMac-Pro ~ % /System/Applications/Books.app -v
zsh: permission denied: /System/Applications/Books.app

macsito@Macsitos-iMac-Pro ~ % /Applications/Brackets.app -v
zsh: permission denied: /Applications/Brackets.app

macsito@Macsitos-iMac-Pro ~ % /Applications/Adobe\ Photoshop\ 2023/Adobe\ Photoshop\ 2023.app -v
1
  • If you do a ls -ld on the applications, you will see that they are directories. Commented Aug 9, 2023 at 12:25

1 Answer 1

3

Application.app is just a folder and it doesn't respond to any parameters in Terminal. If you want to get the app version you have to check it in its Info.plist file. You can do it in Terminal using:

defaults read /path/to/Application.app/Contents/Info.plist CFBundleShortVersionString

So for Books.app it'll be

defaults read /System/Applications/Books.app/Contents/Info.plist CFBundleShortVersionString

which gives me 6.0

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .