How can I check if a compiled binary is 32-bit or 64-bit?
Check out the file
command.
$ file /usr/bin/grep
/usr/bin/grep: Mach-O universal binary with 2 architectures
/usr/bin/grep (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/grep (for architecture i386): Mach-O executable i386
The lipo
binary also does this.
lipo -archs
$ lipo -archs 'Adobe Photoshop Lightroom 5'
x86_64
lipo -info
$ lipo -info 'Adobe Photoshop Lightroom 5'
Non-fat file: Adobe Photoshop Lightroom 5 is architecture: x86_64