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 | |
---|---|
Condition | Description |
-atime +n | -n | n | Find files that were accessed more than n (+n), less than n (-n), or n days ago |
-ctime +n | -n | n | Find files that were changed more than n (+n), less than n (-n), or n days ago |
-group group | Find files belonging to the specified group name or ID number |
-mount | Find files that are mounted on the same file system as pathnames |
-name pattern | Find files whose name matches pattern. For example, find –name 'my*' returns all files starting with my |
This is the default condition. It displays matching files and directories, using full path names | |
-user user | Find files belonging to the user (name or ID) |
3.144.94.190