cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Curl returns exit code 18 for remote file

From: Young,Jim <Jim.Young_at_cerner.com>
Date: Tue, 2 Aug 2011 14:17:45 -0500

-----Original Message-----
I am using ftp through Curl on a CentOS-5.6 based client to check
for the existence of a particular file on a remote host immediately
following an attempted transfer of that file via Curl within the
same script. The remote host is not a *nix box and its ftp server
is both idiosyncratic and quite old.

<stuff deleted>

The problem that I want solved is simply to confirm via ftp that the
file name exists on the target host. So, if this is accomplished in
some other way with curl I would appreciate being informed as to how
that is done.

----End Message----

A suggestion for a slightly different approach - use the --list-only option and grep through the listing output for the file you're interested in.

curl --disable-epsv \
    --silent \
    --list-only \
   ftp://user.account@host.harte-lyne.ca/ \
| grep CCBROKMT

Jim Young

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

-------------------------------------------------------------------
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 2011-08-02