Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

find(1) sucks donkeys' balls

grahamlee (522375) writes | more than 10 years ago

Unix 0

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.

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.

cancel ×

0 comments

Sorry! There are no comments related to the filter you selected.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>