Javatpoint Logo
Javatpoint Logo

Linux find

The find command help us to find a particular file wihtin a directory. It is also used to find a list of files having same pattern name.

After find command we may use following symbols:

(.) : For current directory name

(/) : For root

Finding By Name

You can search all the files ending with extension '.txt'.


Linux Find1

Look at the above snapshot, all the files ending with '.txt' are listed with find command.

Finding By Type

The '-type' parameter is used to specify the file type.

Some of the file types are:

f: regular file

d: directory

l:symbolic links

c: character devices

b: block devices


Linux Find2

Look at the above snapshot, command (find . -type d -name "*.bak") displays all the directories ending with '.bak'.

Finding Newer Files

The '-newer' parameter helps in searching the files which are newer than the mentioned file.


Linux Find3

Look at the above snapshot, all the files displayed are newer than 'msg.txt' file.

Next TopicLinux Locate

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA