[TxMt] [OT] Recommendations for good command line ftp client

Constantinos Neophytou ♎ jaguarcy at gmail.com
Sun Jun 3 17:05:13 UTC 2007


I'm not sure about the standard ftp, but lftp can do this (available  
at least through MacPorts), and is also compatible with TLS/SSL:

lftp -u 'username,password' remote.server.com -e "mput /local/dir/ 
files* /remotedir; exit"

or, to use ssl:

lftp -u 'username,password' remote.server.com -e "set ftp:ssl-protect- 
data true; mput /local/dir/files* /remotedir; exit"

and to restore data,

lftp -u 'username,password' remote.server.com -e "mget /remotedir/ 
files* -O /localdir; exit"

-O is not required if you're saving everything to the local directory.


man lftp should give you all the available options that can go in -e  
"...". The above examples are for just using regular ftp transfers.  
If you want to mirror a directory from ur local machine to the remote  
server, then instead of mput you use:

"mirror --reverse /local/dir/name remotedirname;"

and to restore, you just do

"mirror remotedirname /local/dir/name;"

also, in addition to --reverse, u can use --delete to delete remote  
files that don't exist locally, "--exclude files" to do just that,  
etc. --reverse is required if you're mirroring from the machine  
you're working on to the remote server. Read up on the manual to find  
all the options.

On Jun 3, 2007, at 11:29 AM, hadley wickham wrote:

> Hi guys and gals,
>
> I was wondering if anyone has a recommendation for a good command line
> ftp client - ideally I want something that I can use much like rsync
> but that works over ftp.  ie.  I want to upload entire directory
> trees.  (and I don't think I can do this with the default ftp client,
> but I'd love to be shown wrong)
>
> Thanks.,
>
> Hadley
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

-- 
What's your Dream?
Make it happen with www.dostpost.com



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1288 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20070603/9aa803cb/attachment.p7s>


More information about the textmate mailing list