“find” is the basic Linux command used to search files recursively under a directory tree. It is default available in all the Linux operating systems.
All the Linux command line users must be aware about the uses of the Linux find command. The find command traverse under a directory tree and is capable to search files or directory based on a defined search pattern. It also provides an option to search files with names in uppercase or lowercase or mixed case.
In this tutorial, we will learn about How to Search Files with Case-Insensitive Names in Linux?
Find Files with Case Insensitive Names
Use -name command-line option followed by the file name under a directory tree. The below command will search all files with the name mytechmint.zip under the current directory and sub-directories.
find . –name mytechmint.zip
The above command searches files in case-sensitive names.
Use -iname
option to search file names in any case. Here iname means insensitive names. The following command will match all patterns like mytechmint.zip, myTechMint.zip, MYTECHMINT.ZIP, MyTechMint.zip, mytechmint.ZIP, etc.
find . –iname mytechmint.zip
The case insensitive means any letter of a file name can be uppercase or lowercase. In this situation use find with an option “-iname” to search all files matching files in any case.
For “find” command help page use the below command.
find --help
For “find” command manual page use the below command.
man find
That’s it now you can easily search any file using “find” command in Linux. Feel free to use the comment section in case of a query 😎