Using CURL for FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using CURL for FTP
# 1  
Old 11-11-2011
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
# 2  
Old 11-11-2011
Is it helpful to use ssh and here document to get the things done.
# 3  
Old 11-11-2011
The ftp server needs SSL authentication so I can not use ftp or sftp Smilie
# 4  
Old 11-11-2011
Quote:
Originally Posted by amitshete
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
1-
Code:
curl ftp://FTPSERVER/ 2>/dev/null|grep '.config'

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

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to download files matching pattern from FTP using CURL or WGET?

Hi, For an order I requested, the provider has uploaded a tar file in public FTP site which internally has tons of files (compressed) and I need to download files that follows particular pattern which would be few hundreds. Note: The order can't be requested for files that follows the... (7 Replies)
Discussion started by: Amalan
7 Replies

2. Shell Programming and Scripting

Curl ftp ssl download files

Hello all, I have been struggling with this issue on and off for a couple of weeks now and I just got it all working, so I wanted to share my findings in case some other poor soul needs to know how. First some background on what I'm doing. I am uploading files to different directories based on... (0 Replies)
Discussion started by: msjkadams
0 Replies

3. Shell Programming and Scripting

Curl ftp upload success but no file exist on the server !!!!

hello, I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command upload files... (5 Replies)
Discussion started by: laraaj
5 Replies

4. Shell Programming and Scripting

Help with cURL

Hi all; first of all i need to clarify that i am new to apache2 server configuration and for some needs i want to transfer some files using curl to web directory,so please bear with me: following is the command i m running to transfer file to my web directory: curl -T "q"... (4 Replies)
Discussion started by: arien001
4 Replies

5. Shell Programming and Scripting

curl ftp script

Hello - I'm a novice, so apologies if this is a stupid/answered question. I'm operating on a mac, and I'm using ftp to transfer files to my computer. The files have atypical names, although I have a list of them, addresses included. Is there a way to automate this using curl? That is to... (3 Replies)
Discussion started by: Qroid
3 Replies

6. Shell Programming and Scripting

FTP using cURL

Hi I am trying to fetch a file from a remote location and download it into a local directory ...i was previously doing it quite simply using ftp but now i need to do the same using the cURL tool ...Here i am not getting an option to specify a directory name i am trying the following but... (0 Replies)
Discussion started by: jamshedj
0 Replies

7. Shell Programming and Scripting

help with curl using ssl to ftp file

Currently I am trying to download a file from a secure site that I do not control. I need to use a pem cert to get past their firewall. Currently I am trying to use curl to get the file and return it using the following information pemcert.txt containing the cert, username, password, domain,... (0 Replies)
Discussion started by: gandolf989
0 Replies

8. UNIX for Dummies Questions & Answers

cURL Active FTP Download

Hello, I know this is probably a very silly question for most but how to do I force curl to do active FTP downloads? Thank you Dallas (2 Replies)
Discussion started by: Dallasbr
2 Replies

9. Shell Programming and Scripting

use of curl

I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility. Regards Sandeep (0 Replies)
Discussion started by: jayawantsandeep
0 Replies

10. Shell Programming and Scripting

curl

Aren't there any way to download files as below? For example, I want to download all .html files under the root directory of unix.com/ curl -O https://www.unix.com/*.html This won't work, but please tell me the way to do this. Well, the best way is to get the file list of the directory, but i... (6 Replies)
Discussion started by: Euler04
6 Replies
Login or Register to Ask a Question