> For the complete documentation index, see [llms.txt](https://www.netexec.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.netexec.wiki/ftp-protocol/file-listing.md).

# File Listing

## Listing Files

Directory listings using the `--ls` flag, which includes file permissions:

```bash
nxc ftp 192.168.0.10 -u 'marshall' -p 'badpassword' --ls
FTP         192.168.0.10   21     192.168.0.10    [*] Banner: (vsFTPd 3.0.5)
FTP         192.168.0.10   21     192.168.0.10    [+] marshall:badpassword
FTP         192.168.0.10   21     192.168.0.10    [*] Directory Listing
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Sep 30 17:29 Desktop
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Documents
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Jul 13 23:42 Downloads
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Music
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Pictures
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Public
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Templates
FTP         192.168.0.10   21     192.168.0.10    drwxr-xr-x    2 1000     1000     4096 Aug 28  2022 Videos
FTP         192.168.0.10   21     192.168.0.10    drwx------    4 1000     1000     4096 Aug 28  2022 snap
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.netexec.wiki/ftp-protocol/file-listing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
