LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2014, 04:57 PM   #1
cazanadrian
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Rep: Reputation: Disabled
Question wget to copy files over ftp


Hello all,

I have a problem when I try to copy files from an ftp server to another machine

Code:
wget --no-proxy --no-verbose --no-host-directories --level=1 --timestamping --no-parent --no-directories -r -c -P /home/normal/ ftp://user:pass@xxx.xxx.xxx.xxx/online/normal/file.*
The error which I'm getting is:

Code:
No such file `file.01079'.
No such file `file.01080'.
No such file `file.01081'.
No such file `file.01082'.
and so on

The idea is that I want to copy without directory structure, just the files

Thanks
 
Old 02-26-2014, 05:23 PM   #2
notKlaatu
Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware
Posts: 893

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
wget does not accept wildcards in its targets, so telling it to download, for intance, ''ftp://userass@xxx.xxx.xxx.xxx/online/normal/file.*'' will not work (as you have seen).

Maybe try getting the directory rather than the files within the directory, if that's an acceptable option for you.
 
Old 02-26-2014, 10:42 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
Why are you using "wget" for a ftp site ( that you have to log in to)

For a ftp site use FTP
that will allow you to log in with the user name and password
 
Old 02-27-2014, 03:23 AM   #4
cazanadrian
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
exactly the same command, with wildcards, works if the files are found on the root dir of the ftp server. In this case the files are found in subdirs and the error of "No such file" is coming out.

I'm using wget because I want to sync the files from ftp with another server. Any other good alternatives?
 
Old 02-27-2014, 03:30 AM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,874
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
rsync is probably the best optin for syncing local and remote files/directories if the remote supports it.

Something like...

Code:
rsync -alv user@host:source/path destination/path

Last edited by astrogeek; 02-27-2014 at 03:31 AM.
 
Old 02-27-2014, 03:32 AM   #6
cazanadrian
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
The rsync does not look as an option, the ftp server sits on a windows machine
 
Old 02-27-2014, 03:42 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
rsync can work on windows too. you can also try samba shares
 
  


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
[SOLVED] shell script using wget to download files from ftp, sub directories bayaraa_u Linux - General 1 04-28-2010 03:50 AM
using wget to transfer files ober ftp hkhiroya Debian 1 05-20-2006 05:23 PM
Using wget to copy large amounts of data via ftp. AndrewCAtWayofthebit Linux - General 1 05-11-2006 12:55 PM
Using wget to copy entire ftp directory stuartmunro Linux - Newbie 7 06-17-2005 08:06 PM
I want to download ftp-site files via wget and socks5 proxy server. jiawj Red Hat 2 10-28-2004 04:32 PM


All times are GMT -5. The time now is 04:27 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