cURL / Mailing Lists / curl-users / Single Mail

curl-users

Retrieve filenames SFTP

From: Luis Gonzalez <lgonzalezsa_at_gmail.com>
Date: Mon, 12 Mar 2012 16:38:48 -0600

How can I retrieve the list of filenames in a remote SFTP using cURL?

I launch a basic command
curl --connect-timeout 3 -k -u 'minagri' sftp://1.1.1.1/data/

And I got this:
drwxr-xr-x 2 101 101 512 Mar 9 08:30 .
drwxr-xr-x 3 0 0 512 Feb 15 08:10 ..
-rw-r--r-- 1 101 101 1572 Mar 9 08:30 Precios pima V02 con cnp V02 marzo 2012.csv

But as you see the name of the file has spaces in between. I tried to parse the output but maybe cURL has an option I didn't read.

Luis Gonzalez

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-12