I got a little frustrated with
strings the other day, so I figured I'd share.
strings appears to try to be "smart" about handling fat (universal) binaries by only processing the binary for the host architecture. This means that if you run
strings /some/binary/file it may not actually show you all the strings in the file if the binary is fat. An alternative is to instead use
cat /some/binary/file | strings or you can use the undocumented
-arch option, like
strings -arch all /some/binary/file.
$ cd /Applications/Camino.app/Contents/MacOS/
$ file Camino
Camino: Mach-O fat file with 2 architectures
Camino (for architecture i386): Mach-O executable i386
Camino (for architecture ppc): Mach-O executable ppc
$ strings Camino | wc -l
$ strings -arch ppc Camino | wc -l
$ strings -arch i386 Camino | wc -l
$ strings -arch all Camino | wc -l