Using CURL for FTP

Hello,

I am using curl command to interact with the FTP server. I have gathered some information around downloading / uploading of files using curl command.
However, I couldn't find any information around

1) Listing all the files on FTP server in any given folder having a specific extn.
( ls *.config )
2) Moving files across different folders on FTP server

In short, I am looking out for information which details about using FTP commands on FTP server using curl command.

It will be really helpful. Thanks in advance !!

  • Amit

Is it helpful to use ssh and here document to get the things done.

The ftp server needs SSL authentication so I can not use ftp or sftp :wall:

1-

curl ftp://FTPSERVER/ 2>/dev/null|grep '.config'

2-

curl ftp://FTPSERVER/pub/test.jpg -o "test.jpg" && curl -T "test.jpg" ftp://FTPSERVER/uploads