How do I find a specific file on my VPS?


New Member
Hi there. How do I find a specific file on my VPS? Like, if the file was called, "example.txt" and I am not sure what directory it is saved in, what would be the easiest way to find this?

Aldryic C'boas

The Pony
Assuming you want the simplest solution - for a Debian-based OS, simply run the following:

apt-get install locate && updatedb
locate example.txt

The above to be run as root, of course (or via sudo).  updatedb isn't autonomous - it'll run whenever called manually, or the VM is rebooted.  So if you add a bunch of files, and want them included in the search, you'd need to run updatedb again before running locate filename.
Last edited by a moderator:


New Member
Verified Provider
I have always used find command as it gives me an expected result eventhough it is slow compared to locate.