- file – will provide the file type information. in the case of a binary, it will give the components that makes up the binary
- readlink – will provide the libraries it is linked to
$ readlink /usr/bin/ruby ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby $ file /usr/lib/libruby.dylib /usr/lib/libruby.dylib: Mach-O universal binary with 4 architectures /usr/lib/libruby.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc /usr/lib/libruby.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 /usr/lib/libruby.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/lib/libruby.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64