find -ing all object files recursively: How to

From: Reuben D. Budiardja (techlist_at_voyager.phys.utk.edu)
Date: 11/05/03

  • Next message: Juan Martinez: "Re: find -ing all object files recursively: How to"
    To: redhat-list@redhat.com
    Date: Wed, 5 Nov 2003 08:34:56 -0500
    
    

    Hi all,
    I need some help here. I read manual, but am still not quite good with "find".

    How do I find all object files (*.o, *.a, *.so) recursively under the current
    directory, and pass the result to "nm" so that I can get all the symbol of
    all those object files?

    So the problems are:
    1. Find the object files recursively <-- not quite sure how to do this
    2. pass the result to "nm". I can't figure this out, here is what I've tried:

    [rb@dev petsc-2.1.6]$ find -iname libpetscgsolver.a
    ./lib/libg/linux-gnu/libpetscgsolver.a

    [rb@dev petsc-2.1.6]$ find -iname libpetscgsolver.a | nm -o
    nm: a.out: No such file or directory

    So even when I pipe it to "nm", it wont accept it, why? I can do this however:

    [rb@dev petsc-2.1.6]$ nm -o `find -iname libpetscgsolver.a`

    with the backtick, but I'm not sure if that would work if the output of find
    is more than one file.

    I am in need of tracing all kind of symbol for debugging, so this would help
    me out rather than have to do it manually.

    Any help is greatly appreciated.
    Thanks.

    Reuben D. Budiardja

    -- 
    Reuben D. Budiardja
    Department of Physics and Astronomy
    The University of Tennessee, Knoxville, TN
    ---------------------------------------------------------
    "To be a nemesis, you have to actively try to destroy 
    something, don't you? Really, I'm not out to destroy 
    Microsoft. That will just be a completely unintentional 
    side effect."
                     - Linus Torvalds -
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Juan Martinez: "Re: find -ing all object files recursively: How to"