Linux Basics

40 / 107

Searching files by name

To search by a particular file name, we use the -name option with the command. We can also use *extension instead of a name to search for all files of a particular extension.

For example, we can find all the txt files in the current directory by-

find . -name '*.txt'

where, . indicates the current directory. So, the search will start from the current directory and will be performed in all it's sub-directories too.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...