

Like -regex, but the match is case insensitive.

This test returns false unless the symbolic link is broken. If the -L option or the -follow option is in effect, Like -lname, but the match is case insensitive. The Linux find command has several more case-insensitive operators, including these, which I'm taking directly from the find command man page: The -iname option is what makes the search case-insensitive. The key to that case-insensitive search is the use of the -iname option, which is only one character different from the -name option. Note that on some systems you may also have to use the -print option at the end of that command, like this:įind. (FWIW, I add the -type f option to tell find to just look for files, and not directories.) Here's how I did a case-insensitive search trying to find the same typeahead files with the find command: If for some reason you can't find your files with the Linux locate command, or your system doesn't have the locate command installed, you can also try searching with the traditional Unix find command. To search my entire filesystem for files and directories that contain the string typeahead, just use this command:Ĭase-insensitive file searching with the find command It's easy to perform a case-insensitive file search with the Linux locate command: just add the -i flag. Case-insensitive file searching with the locate command

Both the find command and the locate command have command-line options that provide this support.

I was happy to learn that both of my favorite Unix and Linux file-finding utilities support case-insensitive file searching. While trying to remember where I put it I realized I was going to have to do some case-insensitive file searching. Contact me at (al) at valleyprogramming (dot) com for details.Įarlier today someone asked for the source code for my TypeAhead predictive-text, type-ahead, auto-complete JNLP Swing application. Want to work together? Your business can now hire me (Alvin Alexander) for small Scala and Flutter side projects.
