Code:
ls -aR / | tee /path/to/file.txt
Run as root, otherwise the list will be incomplete because of users permissions to enter some folders.
However, if you just want to find the location of files, you don't need to do the above.
There is a command pair called updatedb and locate. The updatedb command builds a database of all files on the mounted partitions at the time the command is run, and locate will search that database for the pattern given as an option to the command. Like so: locate vim will find every instance of the pattern *vim* in the database. Careful selection of the search pattern limits the undesired returns.