If I want to find a file in a directory or somewhere under it,
find is a very useful utility. Is there a similar utility that will find things in the current directory or above it?
For example, if my file system looks like this:
/proj/ foo/ pom.xml bar/ pom.xml baz/ pom.xml quz/ pom.xml
find /proj/foo/bar -name pom.xml will give me
as it's output. I am looking for a command that would return
(or the opposite order). What I currently tend to do is write a shell script that does something like
while [[ $dir != / ]] do check stuff cd .. done
Does something like this exist?
Ideally, I would like something that works on Linux, Mac and Cygwin in any shell, but something that works on a subset, or only in
bash, is also useful.