I‘d like to match all filename like foo.c, FOO.C, fOO.c, Foo.C and so on using find command under UNIX. How do I do a case-insensitive find search under Sun Solaris / OpenSolaris UNIX systems?
GNU find command has -iname option which is like -name, but the match is case insensitive. For example, the patterns fo* and F?? match the file names Foo, FOO, FoO etc.
How do I do a case-insensitive find under Solaris UNIX?
However, -iname option is not part of Sun Solaris UNIX find command. You can try following syntax under Solaris:
find . -print | grep -i "pattern"
find . -type f -print | grep -i "filename" # match files only
find . -type f -print | grep -i "*.c"
find . -type f -print | grep -i "foo.c"
find . -type d -print | grep -i "dirname" # match dirs only
find . -type d -print | grep -i "directory-name"
You can install GNU/find under Solaris.Share this tutorial on: