How to Search Ignoring Case Sensitivity in Ubuntu (find -iname)

The Case Sensitivity Trap

Unlike Windows, Linux is a strictly case-sensitive operating system. This means that a file named Config.txt is completely different from a file named config.txt or CONFIG.TXT. If you are searching for a lost file using the standard find -name command and your capitalization does not match perfectly, the search engine will return absolutely nothing. When you are unsure how the original developer capitalized a file name, you must force the search engine to completely ignore case sensitivity.

Using the find Command with -iname

The Linux find command utilizes the -iname (insensitive name) flag to blindly match characters regardless of whether they are uppercase or lowercase.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. To scan the entire /etc/ directory for a file named “network”, ignoring all capitalization, type the following command exactly:
  3. sudo find /etc/ -type f -iname "*network*"
  4. Press Enter and provide your administrator password.

Broad Catching

By using the -iname flag combined with wildcard asterisks (*), the command above will successfully catch network.conf, NetworkManager.conf, and NETWORK.log all in a single sweep. This is the absolute fastest and most reliable way to hunt down lost configuration files when you cannot remember the exact spelling or capitalization rules used by the original author.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.