Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Regex-based file/folder search with Spotlight (See related posts)

To get more Spotlight search options use the commands mdimport -A and mdls file.txt in Terminal.app.


mdfind -onlyin ~ "*==*" | grep -i -E 'part.*of.*name'

mdfind -onlyin ~ 'kMDItemContentType == "text"wc' | grep -i -E '.*\.txt$'
#mdfind -onlyin ~ '*==* && kMDItemContentType == "text"wc' | grep -i -E '.*\.txt$'

mdfind -onlyin ~ 'kMDItemKind == "Folder"' | grep -i -E '.*photos.*[0-5]'



You need to create an account or log in to post comments to this site.


Related Posts