find command options starting/path expression
The options attribute controls the behavior and optimization method of the find process. The starting/path attribute defines the top-level directory where the find command in Linux begins the filtering process. The expression attribute controls the assessments that scour the directory tree to create output.
Let’s break down a Linux find command where we don’t just want Linux find file by name:
find -O3 -L /var/www/ -name "*.html"
It enables the top-level optimization (-O3) and permits find to follow symbolic links (-L). The find command in Linux searches through the whole directory hierarchy under /var/www/ for files that have .html on the end.
If you need to know how to find a file in Linux called thisfile.txt, it will look for it in current and sub-directories.
Look for all .jpg files in the /home and directories below it.
Look for an empty file inside the current directory.
Look for all .db files (ignoring text case) that have been changed in the preceding 6 days by a user called randomperson.