> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Xu, 
> Qiang (FXSGSC)
> Sent: Tuesday, November 10, 2009 4:37 PM
> To: libssh2 development
> Subject: response to quoted pwd command in libcurl
> 
> Hi, all: 
> 
> I want to know the default path after the user logs in 
> through SFTP protocol. Therefore, I did the following: 
> ======================================
> q...@durian(pts/2):~/opensrc/curl-7.19.6/src[112]$ ./curl -u 
> qxu:fair123 sftp://13.198.98.190/~/scan/ --quote "pwd" 
> --libcurl sftp_pwd_test.c
> drwxrwxr-x    3 qxu      XOG_cc       9216 Nov  6 18:30 .
> drwxrwxr-x   20 qxu      XOG_cc       3072 Nov 10 16:28 ..
> drwxrwxr-x    2 qxu      XOG_cc       7168 Nov  5 16:14 sxc
> -rwxr-xr-x    1 qxu      XOG_cc        560 Nov  5 16:13 ren3.pl
> -rwxr-xr-x    1 qxu      XOG_cc        131 Nov  2 11:56 ren1.sh
> -rw-r--r--    1 qxu      XOG_cc       2106 Nov  6 18:29 test.txt
> -rwxr-xr-x    1 qxu      XOG_cc         88 Nov  5 16:15 ren2.sh
> -rw-r--r--    1 qxu      XOG_cc       2106 Nov  6 18:30 test1.txt
> ======================================
> The command seems to be successful, but I can only see the 
> destination directory's content listing. How can I retrieve 
> the result of the quoted command "pwd"? By the way, from the 
> generated source code, I couldn't find a place where the 
> command "pwd" is set into some "CURLOPT_XXX". How is the 
> command reflected in the source?

>From http://curl.haxx.se/libcurl/c/curl_easy_setopt.html, I see the quote 
>command can be used with the option CURLOPT_QUOTE, like "curl_easy_setopt(hnd, 
>CURLOPT_QUOTE, "pwd"). But, I still can't figure out a way to retrieve the 
>current working directory returned by "pwd". 

Looking forward to help,
Xu Qiang
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to