Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: A c-shell alias for searching via Spotlight' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A c-shell alias for searching via Spotlight
Authored by: Melle on Mar 30, '06 09:02:32AM

How's about putting this in your .bash_profile:

function spot {
mdfind -onlyin "`pwd`" "$@" |
sed s/^.\*\$/\"\&\"/g |
xargs ls -lt |
sed s:"`pwd`"/:: |
sed "s/^[-dltrwx]*\ *[0-9]*\ [a-z]*\ *[a-z]*\ *[0-9]*//";
}



[ Reply to This | # ]
10.4: A c-shell alias for searching via Spotlight
Authored by: chleuasme on Mar 30, '06 10:47:46AM
or for example :
function spot {
    mdfind -0 -onlyin "$(pwd)" "$@" |
    xargs -0 ls -lt |
    sed "s:^[-dltrwx]* *[0-9]* *[a-z]* *[a-z]* *[0-9]*\(.*\)$(pwd)/\(.*\):\1  \2:"
}


[ Reply to This | # ]