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'.
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
c: character devices
b: block devices
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.
Look at the above snapshot, all the files displayed are newer than 'msg.txt' file.