vulnerhost @ example: find file beatles.mp3
By this, the find command will start searching the required file and will
give the results. If nothing is found for the name, then the empty screen will
be displayed.
There is also an option with an asterisk that will show every file with the
extension. Suppose we only give .mp3 extension
as a file name using
asterisk then find command will search every mp3 extension that is present
in the directory.
Although find is used extensively to search for things in a Linux system it is
often slow. The reason for this is that it starts
from the root directory to
search the file name. For this reason, there
is another command called as
locate that will reduce the search time. We will learn about locating in the
next section.
b) Database lookup
Linux contains system files and databases that exist with them. As
explained earlier it is difficult to search every
application database due to
their length and huge numbers. For this exact reason database lookup is
introduced in Linux.
This will search and input the database files that
are present according to
the search term. Before using the locate command you need to use
updated
so that everything will be refreshed to display the fresh results.
Below is the command for locating command. You can use the file directory
that you prefer or command will search all directories that are present.
vulnerhost @ example: updated
vulnerhost @ example: locate songs.mp3