cURL / Mailing Lists / curl-users / Single Mail

curl-users

FTP directory listing

From: Glen Gunselman <ggunselm_at_emporia.edu>
Date: Tue, 06 Mar 2007 15:08:26 -0600

 
I need to get a listing of the files in the default directory. The example from the manul shows ending the URL with a /. I need this in a bash script. I see the following:
 
curl -q -v ftp://cool.haxx.se/ -l
* About to connect() to cool.haxx.se port 21 (#0)
* Trying 193.15.23.131... connected
* Connected to cool.haxx.se (193.15.23.131) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 1 of 50 allowed.
< 220-Local time is now 21:56. Server port: 21.
< 220-This is a private system - No anonymous login
< 220-IPv6 connections are also welcome on this server.
< 220 You will be disconnected after 15 minutes of inactivity.
> USER anonymous
* FTP response reading failed
* Closing connection #0
curl: (56) FTP response reading failed
curl -q -v ftp://cool.haxx.se/
* About to connect() to cool.haxx.se port 21 (#0)
* Trying 193.15.23.131... connected
* Connected to cool.haxx.se (193.15.23.131) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 1 of 50 allowed.
< 220-Local time is now 21:57. Server port: 21.
< 220-This is a private system - No anonymous login
< 220-IPv6 connections are also welcome on this server.
< 220 You will be disconnected after 15 minutes of inactivity.
> USER anonymous
* FTP response reading failed
* Closing connection #0
curl: (56) FTP response reading failed
 
curl -V
curl 7.16.0 (sparc-sun-solaris2.8) libcurl/7.16.0 OpenSSL/0.9.8d zlib/1.2.3 libidn/0.5.19
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IDN IPv6 Largefile NTLM SSL libz
 
 
Am I missing something or does this not work from the command line?
 
Thanks,
 
 
Glen Gunselman
Systems Software Specialist
TCS
Emporia State University
Received on 2007-03-06