cURL / Mailing Lists / curl-library / Single Mail


RE: Curl sftp question...

From: Joe Ebmeier <>
Date: Wed, 27 Jun 2007 10:11:39 -0500

I have been trying and cannot reproduce the functionality you are describing
with the "-l" option.

My version is 7.16.3 which was the latest I could find as of 6-25:
[root_at_vmspot1 ~]# rpm -q curl
[root_at_vmspot1 ~]#

[root_at_vmspot1 ~]# rpm -q curl-devel
[root_at_vmspot1 ~]#

Here is the directory I am looking at:
[javadev2:/interact/lib]# ls -l
total 564
-rwxrwxrwx 1 root root 572486 Jun 7 09:54

Here is how ftp works with command line curl:
[root@vmspot1 ~]# curl -l -u interact:super ftp://javadev2/lib/
[root_at_vmspot1 ~]

Everything is fine. The -l option lists the file. But when all I change is
to add the sftp and use the absolute path I get this:
[root@vmspot1 ~]# curl -l -u interact:super sftp://javadev2/~/lib/
[root_at_vmspot1 ~]#

Nothing. To prove the command is correct, I remove the -l option and get
[root@vmspot1 ~]# curl -u interact:super sftp://javadev2/~/lib/
drwxr-xr-x 1 0 0 4096 Jun 7 9:52 .
drwxr-xr-x 1 0 0 4096 Jun 7 9:52 ..
-rwxrwxrwx 1 0 0 572486 Jun 7 9:54
[root_at_vmspot1 ~]#

The -l option does not appear to work with sftp or else I am missing
something. Do you have any suggestions?


Joe Ebmeier

-----Original Message-----
[] On Behalf Of James Housley
Sent: Tuesday, June 26, 2007 2:15 PM
To: libcurl development
Subject: Re: Curl sftp question...

On Jun 26, 2007, at 2:19 PM, Joe Ebmeier wrote:

>> For example the ftp protocol is based on the directory you
>> login to. Where sftp is based on the whole file system. For example
>> to get the listing of the home directory for a user would be
>> curl -l -u interact:password sftp://javadev2.interact.nonreg/~/
> Right, I understand that sftp is based on the whole file system,
> but the -l
> option doesn't appear to work for sftp - as it outputs absolutely
> nothing.

Actually it does. Without "-l" all of the information about the
files are displayed. With "-l" only the name is shown.
Unfortunately it also only list directories, which I just committed
the fix for.


/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
                 The Power to Serve
A: Yes.
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
Received on 2007-06-27