The utility find is one of the most useful and important of the Unix utilities. It finds files that match a given set of parameters, ranging from the file's name to its modification date. In this chapter, we'll be looking at many of the things it can do. As an introduction, here's a quick summary of its features and basic operators:
path is one or more directories in which
find will begin to search and operators (or, in more customary jargon,
options) tell find which files you're interested in. The operators are as follows:
Find files with the given
This is the most commonly used operator.
filename may include wildcards, but
if it does, they must be quoted to prevent the shell from
interpreting the wildcards.
Find files with the given access mode. You must give the access mode in octal.
Find the files of the given type, specified by
c is a
one-letter code; for example,
for a plain file,
b for a block
l for a symbolic
link, and so forth.
Find files belonging to user
name may also be a user ID
Find files belonging to group
name may also be a group ID
Find files that are
n blocks long. A
block usually equals 512 bytes. The notation
n says "find files that are over
n blocks long." The notation
c says "find files that are
n characters long." Can you guess
Find files with the ...