To find the path to the file, use the locate command. If you wish to locate the locations of a file named sample.txt, use the following command:
$ locate sample.txt