Conference Topic:

The find command is really awkward and complicated, but saves a lot of time especially with the very powerful -exec option.

We had to use this command in the second assignment, and also in the midterm exam. Try to find out more about it (UNIX in a Nutshell, pp. 70-74, Das, pp. 218-223, and of course, man find), experiment with it, and, if possible, compare it with a similar facility in other operating systems that you know about.

Where do you consider it useful?


Theresa L. Ford on 03-18-2004

I think the find command was misnamed now that I've actually looked at all the options. I had thought find and locate were the same thing, merely equivalents to the basic "find file" searches under Windows. That's apparently not an accurate perception.

Locate may be close to this as a search through a database list of files, but still has regular expressions to exceed the usefulness of Windows' "find file".

Find, however, is not as much a search routine as a structured query language (SQL) equivalent for querying and manipulating the file system:

In this specific [way],
gather [things]
that match [criteria]
and do [action] with or to them.

from current or specific location
traverse recursively down directories or only to a specific depth
follow symbolic links or not
find in subdirectories first
find on a specific file, local, or mounted system

symbolic links
block or character special files
named pipes

not, and, or, equal to, greater than, less than, and metacharacter support where appropriate
file name
created, modified, accessed time
user, group, or nonexistent user, group
number of links
inode number

execute a command (optional 'Are you sure about this one?')
send to a device

Granted, the specific syntax is a bit like ASCII art which requires a "find expert" artist. It seems to logically use:

find [path] [ways] [things] [criteria] [action]

So if "find" was really meant to be this command's name, I have to wonder if it stands for "file inspection neutralizes deviations"? Now I'm definitely going to find more ways to use find.