LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2004, 03:29 PM   #1
Mankind75
Member
 
Registered: Apr 2004
Location: Brome, Lower Saxony, Germany
Distribution: Slackware, OpenMandriva
Posts: 83

Rep: Reputation: 18
Post Resuming FTP transfers on command-line


Hello,

I am looking for a way to transfer files and folders using the ftp command on the command line. The idea is to drop the files to be transferred into one 'outgoing' directory from where they are to be sent to multiple destinations. I am planning to write a script to automate this but I was wondering if FTP transfers can be resumed should a connection break.

Thanks,

Mkd
 
Old 04-19-2004, 03:36 PM   #2
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
ncftp can do this
check the man-page, or the website for the details
 
Old 04-20-2004, 05:12 AM   #3
Mankind75
Member
 
Registered: Apr 2004
Location: Brome, Lower Saxony, Germany
Distribution: Slackware, OpenMandriva
Posts: 83

Original Poster
Rep: Reputation: 18
I have seen ncftp and I think I will be using that one. One more thing: Does anybody know how to do 'batch uploads' to multiple remote sites? Are there any scripts available?
 
Old 04-20-2004, 09:34 AM   #4
InEeDhElPlInUx
Member
 
Registered: Sep 2003
Posts: 107

Rep: Reputation: 15
You can us wget ftp://xxxx. Then to resuem you can just use -r
 
Old 04-20-2004, 11:12 AM   #5
Mankind75
Member
 
Registered: Apr 2004
Location: Brome, Lower Saxony, Germany
Distribution: Slackware, OpenMandriva
Posts: 83

Original Poster
Rep: Reputation: 18
Thanks for the info, but AFAIK wget is mainly for downloads. Does anybody know a solution for uploads as well.

Thanks,

Mkd
 
Old 04-20-2004, 03:23 PM   #6
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
You could try using curl

curl -T file_to_upload ftp://address -u username:password -C -

The "-C -" is to automatically resume. This may not work if the ftp server does not support the SIZE command.
 
Old 04-22-2004, 05:56 AM   #7
Mankind75
Member
 
Registered: Apr 2004
Location: Brome, Lower Saxony, Germany
Distribution: Slackware, OpenMandriva
Posts: 83

Original Poster
Rep: Reputation: 18
Post

I see how it works. But it's mainly that I come to tranferring folders to multiple destinations. Can curl transfer folders as well?
 
Old 04-23-2004, 11:08 AM   #8
Mankind75
Member
 
Registered: Apr 2004
Location: Brome, Lower Saxony, Germany
Distribution: Slackware, OpenMandriva
Posts: 83

Original Poster
Rep: Reputation: 18
Hi everybody, I found a solution which helped to speed up my workflow a bit:

I am using ncftpput and I have written several configuration files with login details.

ncftpput -f [configuration file] -mVz [remote dir] [local dir]/* &

See if I can make a script out of this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is different with Ftp From browser and Ftp from command line zahra79 Linux - Networking 2 06-22-2005 04:26 AM
Best way to upload (FTP) something via the command line... obelxi Linux - Networking 2 03-17-2005 07:15 PM
Command Line FTP erikcw Fedora 3 10-12-2004 10:44 AM
ftp command line acrors Fedora 3 10-02-2004 05:55 AM
command line ftp client keevitaja Linux - Software 2 09-12-2002 05:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration