How to download a file from a FTP server, then automatically delete it from the server once the download completes

ftpwget

From the command line, I want to download a file from a FTP server. Once the download completes, I want the file to be deleted on the server. Is there any way to do this?

Originally I considered wget, but there is no particular reason why to use that specifically. Any tool would be fine as long as it runs on Linux.

Best Answer

with curl:

curl ftp://example.com/ -X 'DELE myfile.zip' --user username:password
Related Question