Recursively traversing sub-directories
What I need to do is recursively traverse some sub-directories, and perform an operation on each file in that subdirectory. More specifically I need to run the specified command on each file and have the output put in the same directory. This is what I have so far:
find . -name *.class -exec jad {} \; This works fine except that the ouput file that jad generates is put in the directory that I run the command from, whereas I need the output to be in the directory where the corresponding file resides. I would appreciate any help. Thanks in advance. |
Try
Code:
find . -name *.class -execdir jad {} \; |
Thanks, that worked perfect. I have to do it on my mac instead of my gentoo box (different versions of find), but I got it to work.
|
All times are GMT -5. The time now is 11:59 AM. |