Show hidden files when searching in finder

I can see hidden files in Finder but when I search it doesn't find hidden files.

I have tried these two commands

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

I also change "File visibility" to "Invisible Items" when searching in Finder search

Can I make my searches easier than this?


Solution 1:

Sadly, I never found a solution to this either. According to LifeHacker there is actually no way to do it except using comercial software. So the only other possible answer your question is 'use the Terminal'

  1. Open a terminal
  2. Enter this command:

    cd <your_directory_of_interest>

  3. Find the files with a name starting with a 'dot'.

    find . -name ".*"

  4. You can redirect the resulting list to a textfile by adding > textfilename to the last command. Then use that file to do whatever you need to do with the files.

Solution 2:

There is a way to search also within hidden files:

  1. Open Finder
  2. Fill search box with searched text
  3. Click "+" button.
  4. Choose "File visibility" and your option.

enter image description here