Can I select the architecture of a program from the command line?

Solution 1:

You can use the arch program to select which architecture of a universal binary to run.

If you wanted to use the 32-bit version of the executable:

arch -arch i386 /usr/bin/bc

And if you wanted the 64-bit version of the executable:

arch -arch x86_64 /usr/bin/bc

Note this doesn't work with applications (folders that end in .app and have manifests and what not so OS X recognizes them as applications), just universal binaries. If you had a app with multiple architectures you'd want to use Launch Services to launch it with a specific architecture.