How to use the find command in Linux


Find utility searches for files in a directory. Basically, files can be found under Linux in many different ways. Using the find utility is one of the best ways to find files. The find utility has a huge number of parameters that can be set so that Linux finds exactly those files that you were searching for.

find  where_to_look  criteria  which_file_want_to_search

$ find / -name report 2>/dev/null

/Start searching from the root directory
-nameGiven search text is the filename rather than any other attribute of a file
reportFile name for which we are looking
2> /dev/null is not related to find utility. Here, 2 indicates the error stream in Linux, and /dev/null is the device where anything you send simply disappears i.e. Above example discard all error messages.
You may want to see
How to use crontab in Linux

Cron is the system process that will automatically perform tasks for you according to a set schedule. The schedule is Read more

How to extract archive file in Linux

To extract archive file in Linux, you can use the tar command, used for extracting content from the archive files. "tar" Read more

How to Change permission of a file in Linux

chmod command is used to change the permission of a file in Linux. In Linux, there is a set of rules for Read more

How to create and remove the directory in Linux

There is a separate command to create and remove the directory in Linux. mkdir command is used to create a directory/folder Read more

Leave a Reply

Your email address will not be published. Required fields are marked *