find

The find command provides many options for searching for files.

The syntax of the command is

						find [pathnames] [conditions]
					

Conditions may be grouped between escaped parentheses:

						/(...conditions...\)
					

They can also be negated with an exclamation point (!-- in Unix-speak, a bang) and given as alternatives --o. Table A.1 describes some useful conditions.

Useful find Conditions
ConditionDescription
-atime +n | -n | nFind files that were accessed more than n (+n), less than n (-n), or n days ago
-ctime +n | -n | nFind files that were changed more than n (+n), less than n (-n), or n days ago
-group groupFind files belonging to the specified group name or ID number
-mountFind files that are mounted on the same file system as pathnames
-name pattern ...

Get Red Hat Linux 6: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.