I have a slightly different question, but it's related to tomte's original question.
I need to do a find on a filename, then extract the path only, not the filename, from the results of the find. So, I would do a find on, say, passwd. The results are /usr/bin/passwd, /etc/passwd, and /etc/security/passwd. I want to get just /usr/bin, /etc, and /etc/security.
Thanks for any help.