LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-28-2006, 01:48 AM   #1
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Rep: Reputation: 0
How to download Hole directrory from FTP Server


Hi,

I have installed Redhat Linux RHEL 4 WS in my system and my kernel version is 2.6.9-22.EL. I want to download some directories from my FTP server, for that I tried to download using the default FTP client which was installed while installing the OS. The problem i am facing here is, I can download only files, but not the hole directory.

ex: if Driver is the Directory
ftp> get Driver
ftp>/../..../Driver: no such file or Directory.

Please any one help me, how to download the hole directory form my FTP Server.

Here I am facing one more problem ie, I am not able to open the directories whose name contains two words seperated by space.
ex: Test Report

It is showing ,
ftp> cd Test Report
ftp> /.../.../Test: no such file or Directory.
Please help me to solve this problem as early as possible.

Regards,
 
Old 02-28-2006, 03:30 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
You can use wget to d/l a directory like this:
Code:
wget -r ftp://username:password@xx.xx.xx.xx/directory
If the directory contains a special character (such is a blank space) you can use the escape character "\" like this:
Code:
ftp> cd Test\ Report
Regards
 
Old 02-28-2006, 04:16 AM   #3
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,

I didn't understand the syntax of downloading the directory from the ftp server. Please describe this little bit briefly.

Regards,
 
Old 02-28-2006, 04:27 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
username and password are obvious, xx.xx.xx.xx is the IP of your server (you can also use the hostname) and directory is the directory you want to download. "-r" means recursively, so wget downloads everything under /directory, even sub-directories. For more info:
Code:
man wget
 
Old 02-28-2006, 05:02 AM   #5
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Original Poster
Rep: Reputation: 0
Hi
ex:
user name : Test
password : Report
Directory : GBT
i tried like this

wget -r ftp://Test:Report@ftp server add/GBT

Still I am not able to download
 
Old 02-28-2006, 05:21 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Try to be more specific. Do you get any errors, or what?
 
Old 02-28-2006, 05:50 AM   #7
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,

This is the procedure i followed,

User name is : Taj
Password is : d290&taj
xx.xx.xx.xx : i mentioned our ftp server add

[root@localhost~] wget -r ftp://taj:d290&taj:xx.xx.xx.xx/GBT

the error i got is,
[4] 4258
ftp://taj:d290 : Bad port number
finished --16.18.29--
download : 0 bytes in 0 files
bash : taj:xx.xx.xx.xx/GBT : No such file or Directory
[3] Exit 1 wget -r ftp://taj/d290
[4] Exit 1 wget -r ftp://taj/d290

Please help me to solve this problem.

Regards,
 
Old 02-28-2006, 06:26 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Mind that you need a "@" not ":" after your password
 
Old 02-28-2006, 06:39 AM   #9
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,
Sorry,
It was a typo mistake.
I tried
[root@localhost~] wget -r ftp://taj:d290&taj@xx.xx.xx.xx/GBT
But still I am getting the same error
 
Old 02-28-2006, 06:53 AM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
OK now I got it. It's the "&" which confuses wget. Run:
Code:
wget -r ftp://taj:d290\&taj@xx.xx.xx.xx/GBT
and you should be set.
 
Old 03-03-2006, 12:27 AM   #11
sumathi
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Posts: 13

Original Poster
Rep: Reputation: 0
Hi,

Thank u very much for your suggetion. Now my problem solved.
I installed gftp, from there also I able to download directories. Once again I want to tell U thanks.

Regards,
Sumathi
 
  


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
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
I want to download ftp-site files via wget and socks5 proxy server. jiawj Red Hat 2 10-28-2004 04:32 PM
FTP DOWNlOAD tangaz Linux - Software 1 12-02-2003 09:10 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 09:23 AM
Can not download from ftp, help me !!! futurist General 1 04-15-2002 06:47 AM


All times are GMT -5. The time now is 08:50 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration