Forgot your password?
typodupeerror
Unix

grahamlee's Journal: find(1) sucks donkeys' balls

Journal by grahamlee

It's pretty common knowledge that the person who wrote find, back in the days of version 1 UNIX from AT&T was working on IBM dinosaurs at the time and used the syntax from there to create find. It's also common knowledge that the syntax to find is pretty much the least UNIX-like of all of the UNIX tools.

What's less obvious - because find isn't used now as it was once, in many places - is just how bogglingly huge and redundant the code in find is. I mean, it has a -exec function which passes its output to the specified command. Now, wtf is xargs(1) supposed to be for? Indeed, that self-same function. find also has the ability to create cpio(1) archives. Well, unsurprisingly, cpio can already do that. The idea of UNIX is to make little tools that do one job properly, and chain them together. So there's no need for find to reimplement code that already exists elsewhere. Especially if it's going to do it in such a non-UNIX manner.

I know what you're thinking; if I hate it, I should fix it myself. Well I did. Grind is Graham's Replacement for fIND, and currently it will only do something similar to find's -name. I'm going to add some bits of find, but by no means all of it. And I'm going to try doing it in a UNIXey way. Documentation and build instructions (and a Mach_O PPC executable, oops) in the tarball.

This discussion has been archived. No new comments can be posted.

find(1) sucks donkeys' balls

Comments Filter:

"Lead us in a few words of silent prayer." -- Bill Peterson, former Houston Oiler football coach

Working...