find -ing all object files recursively: How to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux