I am looking for file "WSFY321.c" in a huge directory hierarchy.
Usually I would use GNU find: find . -name "WSFY321.c"
But I do not know the case, it could be uppercase, lowercase, or a mix of both.
What is the easiest way to find this file?
Is there something better than find . | grep -i "WSFY321.c"
?
-type f
flag so it won't bother looking at the name if the inode is a directory. But that's pedantic levels of optimization... – Shadur-don't-feed-the-AI Feb 20 '12 at 09:47find . -iname \*WSFY321.c\* -type f
– Benj Jun 11 '16 at 22:01-i
before an option follows for otherfind
options too. Ex:-name
to search for a name, and-iname
to make it case-insensitive.-path
to search for a path, and-ipath
to make it case-insensitive. I mention using-ipath
in my answer here: Stack Overflow: How to exclude a directory in find . command. – Gabriel Staples Nov 03 '21 at 19:40