30

I used it a while ago, but cannot find now.

bertieb
  • 7,543
Andy
  • 1,674

2 Answers2

30

You probably want the file command.

hc_dev
  • 325
18

Use the built-in file command.

For example:

file -b pydevd_cython.cpython-310-darwin.so`

Note: the -b or --brief option prevents the output from echoing the file-name again, only shows the file-type and architecture as arm64 (for the new Apple Silicon chip M1):

Mach-O 64-bit bundle arm64

See also: How to Determine File Type & Encoding from Command Line in Mac OS X.

Alternative

To output just the architecture you can also use the command lipo -archs like

lipo -archs /System/Applications/Mail.app/Contents/MacOS/Mail

It will list the used architectures, e.g.

x86_64 arm64

See also:

hc_dev
  • 325