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]'
Never been to CodeSnippets 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)
You need to create an account or log in to post comments to this site.
Related Posts
» grep-based phrase search wit... in grep regex shell osx mac mdfind
» Searching with grep & Spotli... in grep regex shell osx mac mdfind
» opening in a textmate projec... in grep regex shell osx mac unix textmate
» pcregrep - UTF-8 aware grep ... in grep perl shell osx mac bash unix utf8 UTF-8 pcre pcregrep multiline heirloom project
» Counting lines in awk grep shell osx mac bash line unix count file sed directory lines wc
» cmdparser - parse command li... in regex shell osx mac bash command line option parse basic parameter parser switch argument flag getopts getopt posix gnu cmdparser
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails