Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] macOS - How to check if an application is 64bit from the command line (Terminal)
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2741
Topic starter
April 17, 2018 2:18 AM
There are several ways to test if an application is either 32 bit or 64 bit - besides the new "warning" Apple throws at folks (which appears per application only once).
In Terminal this can be done with the "file" command, but the trick is that you have to point "file" to the actual binary.
For example, just going to Applications -> VLC will NOT do the trick, since VLC is just a folder named VLC.app. macOS see this as an application bundle but presents it as a single file. Instead you have to go into the VLC.app folder, and in there Contents/MacOS directory to go find the binary (right click the file in Finder and choose "Show Package Content").
In Terminal, taking VLC as an example:
cd /Applications/VLC.app/Contents/MacOS/
With the "ls" command you can see what the binary is
$ ls -l
total 80
-rwxr-xr-x@ 1 hans staff 38880 Feb 26 21:33 VLC
drwxr-xr-x@ 3 hans staff 96 Feb 26 21:05 include
drwxr-xr-x@ 6 hans staff 192 Feb 26 21:32 lib
drwxr-xr-x@ 342 hans staff 10944 Feb 26 21:32 plugins
drwxr-xr-x@ 5 hans staff 160 Feb 26 21:05 share
Based on the properties we can see that the file VLC a binary is, so now using the "file" command gives us:
$ file VLC
VLC: Mach-O 64-bit executable x86_64
So here we see that VLC is an actual 64 bit application (x86_64).
Below a test example of one of my projects to show a 32 bit example (i386):
$ file project1
project1: Mach-O executable i386
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2741
Topic starter
April 17, 2018 2:45 AM
Note that you can also use COMMAND+i (or right click - Get Info) when selecting a file in the applications directory of course (see 2 sample screenshots).