slocate: All the makings of an intercontinental grudge match

I could be left alone in a windowless room with only a bare light bulb and find to search out the lost files on my computer, and I’d be fine with that.

Then again slocate, and its evil stepsisters in the mlocate coven, might give find a run for its money.

kmandla@6m47421: ~$ time find /usr/lib -iname *pcmcia*
...
/usr/lib/modules/3.14.1-1-ARCH/build/drivers/char/pcmcia
/usr/lib/modules/3.14.1-1-ARCH/build/sound/pcmcia
/usr/lib/initcpio/install/pcmcia

real	0m0.400s
user	0m0.120s
sys	0m0.090s

And the upstart?

kmandla@6m47421: ~$ time slocate -qi pcmcia | grep /usr/lib
...
/usr/lib/udev/pcmcia-check-broken-cis
/usr/lib/udev/pcmcia-socket-startup
/usr/lib/udev/rules.d/60-pcmcia.rules

real	0m0.303s
user	0m0.240s
sys	0m0.000s

Uh-oh. This could shape up to be the match of the century. 😯

Loyalists will insist that slocate is cheating, because it doesn’t really search so much as skim through its database and pick out the stuff you want.

Bolsheviks will counter with reduced time searching, less disk thrashing and adherence to the Second Law of Robotics.

For my own part, I’m not a big fan of databases and meta-information on my system. I appreciate s/m/locate‘s speed and conservation of energy, but my allegiance lies with find.

And really, I know where everything is on my computer. I don’t go searching for stuff that often. 🙄

So I say … down with the revolution! 😈

One thought on “slocate: All the makings of an intercontinental grudge match

  1. Pingback: Links 29/4/2014: New Debian, New Award for Torvalds | Techrights

Comments are closed.