The find command is a much more powerful command you can use to search for files in Linux. Unlike the locate command, the find command runs in real time, so you don’t need to update any file database. The general syntax of the find command is as follows:
find [starting-point(s)] [options] [expression]
The find command will search under each starting-point (directory) you specify.
For example, to search for all the .txt files under your /home directory, you can run:
root@ubuntu-linux:~# find /home -name "*.txt"
/home/elliot/facts2.txt
/home/elliot/dir1/directory2/file1.txt
/home/elliot/dir1/directory2/file3.txt
/home/elliot/dir1/directory2/file2.txt
/home/elliot/soft.txt
/home/elliot/facts.txt
/home/elliot/practise.txt
/home/elliot/upper.txt
/home/elliot/mydate.txt
/home/elliot/all.txt
/home/elliot/Mars.txt
/home/elliot/output.txt
/home/elliot/planets.txt
/home/elliot/error.txt
/home/elliot/animals.txt
/home/ghost.txt
The -name option searches for filename; there are...