Find all Intel-native apps on your Mac

If you’ve got an Intel Mac, you know that you really want to have as many of your applications as possible Universal—that is, able to run run natively on Intel-based machines—rather than use Rosetta emulation. Rosetta is practical, but much slower than native applications.

There are several ways that you can check up on your applications to find which are Universal and which are not.

First, you can open System Profiler (in your Utilities folder), click on Applications in the Contents column, and see a list of all the applications on your Mac. The Type column shows which are Universal and which are PowerPC only. This even shows you which apps can run in Classic if you are running a PowerPC Mac.


But there are ways to do this from Terminal as well.

Here’s the code for a shell script that will look in your Applications folder and find not only which applications have no Intel support, but which contain some parts that are not Intel-native. Where this script goes further than System Profiler is in finding parts of applications that are not Intel-native, even if the applications themselves are.

	# !/bin/sh


find /Applications -type d -name MacOS -maxdepth 3 2>&1 |
while read line
do
app_home=`find "$line" -type f -maxdepth 1 -perm +a=x`
echo "$app_home" |
while read app
do
result=`file "$app"`
echo "$result" | grep "executable" | grep -v "universal"
| grep -v "for architecture" >> /tmp/$0.notuniversal.$$
done
done
cat "/tmp/$0.notuniversal.$$" | grep "ppc" |
awk -F/ '{ print $3 " nt(" $6 ")" }' >> /tmp/$0.output.$$
echo "The following applications have executables with no Intel support: "
echo "-------------------------------------------------------------------"
cat "/tmp/$0.output.$$" | sed -n 'G; s/n/&&/; /^([ -~]*n).*n1/d; s/n//; h; P'
echo "-------------------------------------------------------------------"
rm /tmp/*.$$

One thing to note: while this script is set to look in your Applications folder, you can change that path (in the line containing find /Applications ) to another path if you store applications in other locations. (System Profiler only checks your Applications folder.) You could also have it search your entire Mac, using the path /, but that would take much longer.

Copy and paste the above code into either TextEdit or another text editor, then save the script somewhere in your path for easy access. After saving, open Terminal and do this: type

cd
, press the space bar, then drag and drop the folder into which you saved the script into the Terminal window. This will load the file at its path. Press Return, then type
chmod +x
, press the space bar, and drag the file to the Terminal window. This makes the file executable.

To run your script in the future, cd into that directory again, then type

./scriptname
, where scriptname is the name you used when saving the file.

  
Shop Tech Products at Amazon