The basic syntax for
find is this:
Code:
find <startingdirs> <globalopts> <tests> <actions>
All of the sections can have multiple entries.
If you don't include any starting directories then most versions of
find will default to the $PWD, but it's generally better to explicitly set them anyway. At the very least it removes any ambiguity.
(If you aren't aware yet, "
." is a hardlink to the current directory. This is built into the file system itself.)
In addition, if you don't include any actions, the default is usually to
print the files. But if you have a compound "or" expression you generally have to include your actions explicitly. So again, I think it's better to always include them anyway.
Finally, be aware that I'm mostly writing from experience with
gnu find, and I don't know much about other versions.
Here are a couple of good links about using find:
http://mywiki.wooledge.org/UsingFind
http://www.grymoire.com/Unix/Find.html