6.2 Finding Files
You can use find to search a directory including all subdirectories for files that have certain characteristics. Possible search criteria include the name, the file size or the date of the last modification. However, find never includes the content of the file.
You need to pass the initial directory for the search to the command (or . for the current directory). The search criteria are formulated with countless options, whereby all criteria must apply simultaneously (logical AND operation). The following examples are merely a small indication of the capabilities of find. You can get much more information via man find. Some find commands are preceded by sudo, which will run the search in root mode (Section 6.4). This addition ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access