Finding files

In a filesystem, there is huge number of files available. Sometimes, there are external devices that are attached as well, which may also contain huge number of files. Imagine that there are millions and billions of files in a system and in which we have to search for a specific file or pattern of a file. Manual searching of a file is possible if the number of files is from 10 to 100, but it is almost impossible to search in millions of files. To solve this problem, UNIX and Linux provide the find command. It is a very useful command for searching files in a computer.

The syntax of using the find command is as follows:

find search_path [option]

Here, in search_path, specify the path in which find should search for file_search_pattern ...

Get Linux Shell Scripting Essentials 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.