mdfind tool : consider in the same time, to perform researching of files, a substring of the filename and the insensitive case for these substrings
Would mdfind -interpret somestring
work?
How 'bout a script?
#!/bin/bash
if [ $# -lt 1 ]; then
echo "$(basename $0) portion-of-filename"
exit
fi
find / -type f -print 2>/dev/null | gawk -F'/' -v searchFor="$1" '
BEGIN{
IGNORECASE=1
}
searchFor {
base=$NF
if (index(tolower(base), tolower(searchFor))) {
printf("%s\n",$0)
}
}
'