Download a file from FTP while keeping its remote filename
Build a paste-ready command, then review its compatibility and effects before running it.
curl --fail --show-error --remote-name --user <username> ftp://<host>/<remote-file>Complete required fields to copy the generated command.
Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
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 signals% Total % Received % Xferd Average Speed Time Time Time CurrentRepresentative 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 --remote-name --user {{user}} ftp://{{host}}/{{remoteFile}}Re-run the corresponding read-only inspection and confirm the intended state.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
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--remote-nameOptionSaves the download using the filename from the remote URL.
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-file>ParameterA value supplied in the Fill parameters section.
Example input
curl --fail --show-error --remote-name --user alice ftp://ftp.example.com/pub/release-2026.07.tar.gz
Example output
% Total % Received % Xferd Average Speed Time Time Time Current
100 42.8M 100 42.8M 0 0 18.5M 0 0:00:02 0:00:02 --:--:-- 18.5M
Saved: release-2026.07.tar.gz
Illustrative output — exact values vary by system and data.
Official sources
Related commands