How to set Finder to show all files in search including hidden and Library files?
You can add the System files and File visibility attributes to the filter bar:



Files that start with a period are still excluded though.

This makes Finder show hidden files:

defaults write com.apple.finder AppleShowAllFiles -bool true


mdfind includes system files by default, but it doesn't include hidden files unless you specify kMDItemFSInvisible=1.

mdfind 'kMDItemFSName=.bash_profile&amp;&amp;(kMDItemFSInvisible=1||kMDItemFSInvisible=0)'