List files in a remote FTP directory with curl
Build a paste-ready command, then review its compatibility and effects before running it.
curl --fail --show-error --list-only --user <username> ftp://<host>/pub/Complete required fields to copy the generated command.
Compatibility
FTP or FTPScurl prompts for the password when --user contains only a username. Prefer FTPS or SFTP on untrusted networks.
Operational knowledgereview due 2027-01-19
Requirementscurlcurl must be installed and available on PATH.Network accessThe target must be reachable from the current environment.
Version supportcurl Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsrelease-2026.07.tar.gzRepresentative successful output; values vary with the selected target and system state.
Known errorscurl: command not foundcurl is missing or is not available on PATH.
Verifycurl --fail --show-error --list-only --user {{user}} ftp://{{host}}/{{remotePath}}/The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01curlCommandRuns the curl stage of this one-liner.
02--failOptionReturns a failure status when the server reports an FTP or HTTP error.
03--show-errorOptionKeeps transfer errors visible when curl is also used in silent mode.
04--list-onlyOptionRequests only remote directory entry names instead of a detailed listing.
05--userOptionSupplies the FTP username; curl prompts for a password when it is omitted.
06<username>ParameterA value supplied in the Fill parameters section.
07ftp://<host>/ParameterA value supplied in the Fill parameters section.
08<remote-path>/ParameterA value supplied in the Fill parameters section.
Example input
curl --fail --show-error --list-only --user alice ftp://ftp.example.com/pub/
Example output
release-2026.07.tar.gz
release-2026.07.tar.gz.sha256
README.txt
Illustrative output — exact values vary by system and data.
Official sources
Related commands