Why does `arch` output `i386`?
When I run $ arch
on my 10.9 2012 MacBook Pro, I get the output
i386
The manpage for arch
says that
the arch command is 2-way universal, 32-bit only
However, $ file "$(which arch)"
gives
/usr/bin/arch: Mach-O universal binary with 2 architectures
/usr/bin/arch (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/arch (for architecture i386): Mach-O executable i386
OTOH, python2.7
is running as a 64-bit executable:
$ /usr/bin/python2.7 -c 'import sys; print "%x" % sys.maxint'
7fffffffffffffff
Also, the kernel is apparently 64-bit:
$ file /mach_kernel
/mach_kernel: Mach-O 64-bit executable x86_64
uname
agrees:
$ uname -m
x86_64
..or does it?
$ uname -p
i386
Here you go:
uname -p print the machine processor architecture name.
uname -m print the machine hardware name.
The arch command with no arguments, displays the machine's architecture type.
Ultimately I suspect this is the answer you want: https://stackoverflow.com/questions/12763296/os-x-arch-command-incorrect
For further confusion, run:
$arch
i386
$machine
i486
$uname -m
x86_64
$uname -p
i386