Sunday, 20 January, 2002
Unix find Command Difficult to Use
find . -name filename -print
Egads. Sorry, folks, but that's just wrong. Heck, even DOS is easier:
dir filename /s
Yes, I know that find can do much more than dir. It can execute programs, format the output, brush your teeth, and comb your hair if you have any left after trying to decipher the man page:
find - search for files in a directory hierarchy
find [path...] [expression]
This manual page documents the GNU version of find. find searches the directory tree rooted at each given file name by evaluating the given expression from left to right, according to the rules of precedence (see section OPERATORS) until the outcome is known (the left hand side is false for and operations, true for or), at which point find moves on to the next file name.
(Remainder of 700 lines removed)
What? I don't care about expressions, operator precedence and all that rot, I just want to find a freakin' file! I read that first paragraph and decided I'd go look for a simpler program. I really didn't want to spend 30 minutes learning the tool just to find a file that I knew was in one of a half dozen places. Kind of like flying a 747 down to the convenience store.
I'm all for powerful tools for advanced users, but not at the expense of simple tools for the most common uses. Keep your find. I'm going to write something usable.