I ever asked questions about find files recursively and rename a set of files in current directory.
the following command , which can remove files with extension .a recursively, is based on the answers.
find pathname -type f -name "*.a" | sed -e 's/\(.*\)\.a/rm \1.a/' |sh
I feel I make it complicated. Is there other way to do it?