> For the complete documentation index, see [llms.txt](https://alexanderbittner.gitbook.io/pentest-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alexanderbittner.gitbook.io/pentest-resources/general/os-basics/filesystem/find-a-file-directory.md).

# Find a file / directory

{% tabs %}
{% tab title="Windows" %}

{% endtab %}

{% tab title="Linux" %}

| Command                                        | Description                                                                        |
| ---------------------------------------------- | ---------------------------------------------------------------------------------- |
| `updatedb`                                     | Update the file db that locate uses                                                |
| `locate <FILE.extension>`                      | Find a file on the file system                                                     |
| `which <FILE.extension>`                       | Returns path to file according to current PATH environment                         |
| `find /path/to/search -name <FILE.extenstion>` | More aggressive than locate or which; recursively searches a given path for files. |
| {% endtab %}                                   |                                                                                    |
| {% endtabs %}                                  |                                                                                    |
