`find` is a tool used to search files on basis of several categories. It is a very usefil and powerful tool. It can search fle by name, size, ownership, date, pattern ,depth of Directory etc and action can be taken on further output.
find [where to search] [ attributes for search] [options] [ name or pattern to search]
1. -exec [command]: it executes the command to further output from find.
2. -ok CMD : It works same as -exec except the user is prompted first.
3. -inum N : It Search for files with inode number ‘N’.
4. -links N : It Search for files with ‘N’ links.
5. -name demo : It Search for files that are specified by ‘demo’.
6. -newer file : It Search for files that were modified/created after ‘file’.
7. -perm octal : It Search for the file if permission is ‘octal’.
8. -print : It Display the path name of the files found by using the rest of the criteria.
9. -empty : It Search for empty files and directories.
10. -size +N/-N : It Search for files of ‘N’ blocks; ‘N’ followed by ‘c’can be used to measure size in characters; ‘+N’ means size > ‘N’ blocks and ‘-N’ means size < 'N' blocks.
11. -user name : It Search for files owned by user name or ID ‘name’.
12. \(expr \) : It is True if ‘expr’ is true; used for grouping criteria combined with OR or AND.
13. ! expr : It is True if ‘expr’ is false.
This is directory structure.
1. Finding file name from address.
2. finding files by pattern name.
3. finding files and accessing output.
4. finding files on basis of size.
5. finding files by user ownwership.
6. finding files by time creation,modified and accessed.