20

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

bertieb
  • 7,344
  • 36
  • 42
  • 54
Andrei
  • 1,554
  • 5
  • 19
  • 28

2 Answers2

24

You probably want the file command.

hc_dev
  • 183
  • 1
  • 6
Ignacio Vazquez-Abrams
  • 111,361
  • 10
  • 201
  • 247
8

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
  • 183
  • 1
  • 6