Live data from Hacker News

Using Spotlight from the OS X Commandline

0xfe.blogspot.com

31–32 of 32 posts

Re: Using Spotlight from the OS X Commandline

#31
post #11
post #4

Earlier quoted context omitted.

`security` lets you manipulate your Keychains. `say` lets you do text-to-speech in command line.

say is pretty useful and fun. When I'm compiling or just telling the Terminal to do something tedious, I add a say command at the end and it will notify me when it's done. For example, if I want to install mercurial and git with homebrew: brew install git mercurial; say "The task is finished, Master."

A more silent option is to print the bell character to the terminal, ie.: sleep 5; printf '\a'

This will cause the terminal to bounce and add a little badge with the number of tasks that require your attention if it's out of focus :)

Re: Using Spotlight from the OS X Commandline

#32
post #28

Seems like alias locate='mdfind' is in order (on my system).

mdfind is basically orthogonal to locate (doesn't match individual files inside packages; handles wildcards differently), but it does produce find(1)-compatible output, which is nice:

http://jasomill.at/mdfind-dired.el

Post reply on HN