Hardware Reference
In-Depth Information
Source the file as in the previous topic, and try to search, a command you
entered previously:
debian@beaglebone:~$ histogrep Mediadrop
Different ways to find your files
When you don't remember where a specific file is located, you can rely on
some Linux tools. In this specific case, let's say that we want to retrieve the
deployment.ini location; thus we can use two different commands:
To find your files, run the following command:
(mediacore_env)debian@beaglebone:~$ find / -name production.ini -type f
2>/dev/null
The various parameters involved are as follows:
/ : We want to look into the root partition. Obviously, if you install MediaDrop
to another partition, set it accordingly.
-type f (optional): This optimizes the search, as we want to find only files
but not directories.
2>/dev/null (optional): This is to remove annoying and most of the time
useless Permission denied messages.
While being really powerful, the find command requires some options, which you have
to know, to use it well. The locate command is a quick and an easy way to find your file.
You will have to install it, as this command is not installed, by default. You will retrieve
it from the mlocate package.
To request an update of the index of all your files, use the following command :
debian@beaglebone:~$ sudo updatedb
Now you can search for any file with the following command:
debian@beaglebone:~$ Locate production.ini
You have the result(s) instantly, faster than with the find command .
What is perturbing with locate is that you might not find a file that can exist anyway.
This situation happens when the searched-for file had been created after the indexation
of the locate database.
 
Search WWH ::




Custom Search