cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: wildcards for uploads

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Thu, 11 Oct 2007 14:48:15 -0600

At 13:26 -0700 10/11/07, Brian Dessent wrote:
>cd ~/local/dir
>FILES=$(find -L . -name 'source' -prune -o ! -name '*~' \
> -type f -printf '%P,' | sed -e 's/,$//')
>curl -v --disable-epsv --ftp-create-dirs -u user:passwd \
> -T "{$FILES}" ftp://remote/dir//absolute/path

When I do things like that I replace the "-u user:passwd" part with a single -n and curl goes to my $HOME/.netrc file to get the name and password data. .netrc is readable by owner only and is a whole lot safer than bits of code around that contains passwords.

-- 
-->  Halloween  == Oct 31 == Dec 25 == Christmas  <--
Received on 2007-10-11