Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>file</code> command can detect what binary types are available in a file.</p> <pre><code>file -b /usr/bin/atrm setuid Mach-O universal binary with 3 architectures /usr/bin/atrm (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/atrm (for architecture i386): Mach-O executable i386 /usr/bin/atrm (for architecture ppc7400): Mach-O executable ppc </code></pre> <p>So, then, it is just a matter of using find and filtering appropriately. Something like this should find all binaries on the system that have a PPC subsection.</p> <pre><code>find / -perm -u+x ! -type d -exec file {} \; | grep ppc | awk '{print $1}' </code></pre> <p>PPC only is a little more difficult. For that, you'll want to do three commands to create 2 files in /tmp, the first containing a list of PPC files and the second a list of 32 or 64 bit x86 files. Conveniently, 'ppc' matches ppc and ppc64.</p> <pre><code>find / -perm -u+x ! -type d -exec file {} \; | grep ppc | awk '{print $1}' &gt; /tmp/ppc find / -perm -u+x ! -type d -exec file {} \; | grep i386 | awk '{print $1}' &gt; /tmp/x86 find / -perm -u+x ! -type d -exec file {} \; | grep x86_64 | awk '{print $1}' &gt;&gt; /tmp/x86 </code></pre> <p>Then, sort/uniq a bit (just sorts the paths and makes sure each binary is only listed once):</p> <pre><code>cat /tmp/x86 | sort | uniq &gt; /tmp/x86.filtered cat /tmp/ppc | sort | uniq &gt; /tmp/ppc.filtered </code></pre> <p>Then, use diff (and a bit more processing) to spew the list of files that are ppc only:</p> <pre><code>diff /tmp/ppc.filtered /tmp/x86.filtered | grep -e '&lt;' | awk '{print $2}' | perl -p -e 's/:$//' </code></pre> <p>The end result should be a list of files that only contain ppc executable mach-o sections. I would suggest verifying the list before nuking anything.</p> <p>Some notes:</p> <p>All of the above is done in the Terminal.</p> <p>This is just a hack; it worked just fine on my system and I'm glad you asked because I wanted to know the same. But it is just a hack. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload