You want to find a file that you know is on the system somewhere.
Use the Linux find command.
Discussion
Starting with a directory specified in the command, the find command will search, and if it finds the file, display its location. For example:
$ find /home/pi -name gemgem.py /home/pi/python_games/gemgem.py |
You can start the search higher up the tree, even at the root of the whole filesystem (/). This will make the search take a lot longer, and will also produce error messages. You can redirect these error messages by adding 2>/dev/null to the end of the line.
To search for the file throughout the entire filesystem, use the following command:
$ find / -name gemgem.py 2>/dev/null /home/pi/python_games/gemgem.py |
You can also use wildcards with find as follows:
$ find /home/pi -name match* /home/pi/python_games/match4.wav /home/pi/python_games/match2.wav /home/pi/python_games/match1.wav /home/pi/python_games/match3.wav /home/pi/python_games/match0.wav |
See Also
The find command has a number of other advanced features for searching. To see the full manpage documentation for find, use this command:
$ man find |