LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-04-2005, 03:18 PM   #1
Martin Strand
LQ Newbie
 
Registered: Apr 2005
Posts: 16

Rep: Reputation: 0
Using ftp client


Hi, I just installed Debian's "ftp" package and want to use it to download all files from another server of mine. I can log in and download individual files, but I don't know how I would tell the client to download _everything_ rather than one file at a time. It's over 5000 files, I'd hate to do it by hand, lol.

Thanks,
Martin
 
Old 04-04-2005, 03:41 PM   #2
naimslim89
Member
 
Registered: Mar 2005
Location: London, United Kingdom
Distribution: Fedora Core 5
Posts: 83

Rep: Reputation: 15
I don't regularly use FTP, but you may try to use wildcards when obtaining the files.

Code:
$ ftp site.domain.com (your site here)
la-de-da... (login information)
Password:
...

> get *
Here's how wildcards work:

* means any character, any number of characters. Anything, basically.
For example:

* = any file - can be used to download ALL files.
*.html = any file with the HTML extension
cat* = any file that begins with "cat" and has any character(s) after it.

? means ONE character, whatever it may be.

For example:

??? = any three-character-long file.
lib??????.so = any file that begins with "lib", followed by six characters of any kind, and ends in ".so"

These are the two that I can think of off the top of my head but I'm sure they're others!

Let us know how you get on!
 
Old 04-04-2005, 04:00 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
get doesn't accept wild-cards.

To be able to use a wildcard you'll need to use
mget *
To NOT be asked for each file you want to turn
prompting off (it's on by default).
So, a sensible thing (once you're logged in) would be:
bin
prom
mget *




Cheers,
Tink
 
Old 04-04-2005, 04:13 PM   #4
Martin Strand
LQ Newbie
 
Registered: Apr 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Seems like mget * won't work. Instead, I had to use mget subdir/*. Well, it's still a lot better than grabbing all of them by hand.

Thanks for your input. I'll be back with more stupid questions soon.
 
Old 04-04-2005, 04:15 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by Martin Strand
Seems like mget * won't work. Instead, I had to use mget subdir/*. Well, it's still a lot better than grabbing all of them by hand. :)

Thanks for your input. I'll be back with more stupid questions soon. ;)
Well, yeah ... the standard ftp tools know nothing
about recursion. The mget * would have worked
if you had done a "cd subdir" first.



Cheers,
Tink
 
Old 04-04-2005, 04:19 PM   #6
Martin Strand
LQ Newbie
 
Registered: Apr 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Ok, I see now. Thanks.
 
Old 04-04-2005, 05:33 PM   #7
naimslim89
Member
 
Registered: Mar 2005
Location: London, United Kingdom
Distribution: Fedora Core 5
Posts: 83

Rep: Reputation: 15
Quote:
Originally posted by Tinkster
get doesn't accept wild-cards.
Oops, my bad! only made an assumption because of the ability to use them in the shell.
 
  


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
the best FTP client? kermit Linux - Software 13 01-04-2005 03:08 PM
FTP Client csrs Linux - Newbie 12 07-15-2004 11:18 PM
FTP *client* ? fr0zen Linux - Software 4 12-04-2003 08:56 PM
ipchains, ftp from client to non-ftp ports atari303 Linux - Networking 2 11-08-2002 02:43 AM
FTP Client Chijtska Linux - Networking 6 02-10-2002 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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