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]'