ugh.book

(singke) #1
Find 165

designed with a human user and modern networking in mind. The Unix file
finder program, find, wasn’t designed to work with humans, but with
cpio—a Unix backup utility program. Find couldn’t anticipate networks or
enhancements to the file system such as symbolic links; even after exten-
sive modifications, it still doesn’t work well with either. As a result, despite
its importance to humans who’ve misplaced their files, find doesn’t work
reliably or predictably.


The authors of Unix tried to keep find up to date with the rest of Unix, but
it is a hard task. Today’s find has special flags for NFS file systems, sym-
bolic links, executing programs, conditionally executing programs if the
user types “y,” and even directly archiving the found files in cpio or cpio-c
format. Sun Microsystems modified find so that a background daemon
builds a database of every file in the entire Unix file system which, for
some strange reason, the find command will search if you type “find file-
name” without any other arguments. (Talk about a security violation!)
Despite all of these hacks, find still doesn’t work properly.


For example, the csh follows symbolic links, but find doesn’t: csh was
written at Berkeley (where symbolic links were implemented), but find
dates back to the days of AT&T, pre-symlink. At times, the culture clash
between East and West produces mass confusion.


Date: Thu, 28 Jun 1990 18:14 EDT
From: [email protected]
Subject: more things to hate about Unix
To: UNIX-HATERS

This is one of my favorites. I’m in some directory, and I want to
search another directory for files, using find. I do:

po> pwd
/ath/u1/pgs
po> find ~halstead -name "*.trace" -print
po>

The files aren’t there. But now:

po> cd ~halstead
po> find. -name "*.trace" -print
./learnX/fib-3.trace
./learnX/p20xp20.trace
./learnX/fib-3i.trace
./learnX/fib-5.trace
./learnX/p10xp10.trace
Free download pdf