3 ms·
Great list, some really useful commands. One question: What's wrong with "locate"? It is really fast because the file system contents are indexed. As long as y
by mirkules 11y ago
Great list, some really useful commands.
One question: What's wrong with "locate"? It is really fast because the file system contents are indexed. As long as you understand that it's not going to pick up the latest new files without running "updatedb" (sudo/usr/libexec/locate.updatedb" in os x) first, it's much better than find if you're doing a quick search.
However, I didn't know spotlight has a CLI. Cool.
- jmount 11y agoGiven spotlight is getting more and more broken, I'd say give "locate" a try.
- skygazer 11y agoI prefer mlocate to locate, as it rebuilds the index in a flash by diffing and by paying attention to modification dates when traversing, so you can run its updatedb more frequently without a noticable penalty. That said, mdfind is terrific -- it's index is, as you suggested, always upto date, and it doesn't just index file names, but also content.
- senderista 11y agoI like to use mdfind for ack-style search over my whole system: https://gist.github.com/senderista/1246300 https://gist.github.com/senderista/1246300