[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need help to use find and curl together to upload a directory

From: James Youngman
Subject: Re: I need help to use find and curl together to upload a directory
Date: Mon, 12 Aug 2013 17:46:56 +0100

On Mon, Aug 12, 2013 at 11:45 AM, Christoph Roland Murauer
<address@hidden> wrote:
> Hello !
> My WebHoster doesn't provide SSH or rsync so I decided to use find and curl 
> to upload my files on a FTPES (FTP over SSL / FTP over TLS) server.
> The curl part worked fine using
> curl -T ./filename -v -k -u address@hidden:password ftp://server/directory/ 
> --ftp-ssl
> But when I try to upload a whole directory (including subdirectories) using
> find . -exec curl --ftp-create-dirs -T {} -v -k -u address@hidden:password 
> ftp://server/directory --ftp-ssl \;
> I have the problem, that curl or find treats everything as a file instead of 
> directories if there are some (means I like to get the same structure on my 
> FTP account as I have on my local machine).

I don't clearly understand the problem you are trying to describe (you
might find it helpful to review
http://www.catb.org/esr/faqs/smart-questions.html).   Are you saying
that find launches curl with an incorrect command-line?    If so, what
command-line did you want and what are you getting?  If curl is being
launched with the command-line you expect, but you are not getting the
result you hope for, this is likely a problem that you should take up
with the curl user mailing list and/or developers.

But since you are passing --ftp-create-dirs to curl, perhaps you don't
want to pass any directories as the expansion of {} when invoking
curl.   If that's the case you could just put "-type f" on find's
command-line before the "-exec".

> How could I fix this ? Thanks for your answer.
> Regards,
> C. M.

This email is intended solely for the use of its addressee, sender,
and any readers of a mailing list archive in which it happens to
appear.   If you have received this email in error, please say or type
three times, "I believe in the utility of email disclaimers," and then
reply to the author correcting any spellings (and, optionally, any
incorrect spellings), accompanying these with humorous jests about the
author's parentage.   If you are not the addressee, you are
nevertheless permitted to both copy and forward this email since
without such permissions email systems are unable to transmit email to
anybody, intended recipient or not.  To those still reading by this
point, the author would like to apologise for being unable to maintain
a consistent level of humour throughout this disclaimer.  Contents may
settle during transit.  Do not feed the animals.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]