mget question | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

mget question

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-20-2002
ho_k ho_k is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 16 May 2002, 7:43 AM EDT
Location: Australia
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mget question

Basically, I like to know how "mget" command work in terms of data/control channels and in terms of request-respond dialogue.

Also, when I try the command as an example below, is it true than for each file to be transferred, there is a new connection establish? (ie. transferred one file, disconnect, reconnect for another file) or do all files get transferred in one connection?

Thanks

==
ftp> mget *.txt
200 Type set to A.
mget userb.txt? y
200 PORT command successful.
150 ASCII data connection for userb.txt (203.173.129.136,3816) (26 bytes).
226 ASCII Transfer complete.
ftp: 31 bytes received in 0.01Seconds 3.10Kbytes/sec.
mget userc.txt? y
200 PORT command successful.
150 ASCII data connection for userc.txt (203.173.129.136,3817) (28 bytes).
226 ASCII Transfer complete.
ftp: 33 bytes received in 0.02Seconds 1.65Kbytes/sec.
mget userd.txt? y
200 PORT command successful.
150 ASCII data connection for userd.txt (203.173.129.136,3819) (27 bytes).
226 ASCII Transfer complete.
ftp: 32 bytes received in 0.02Seconds 1.60Kbytes/sec.
Sponsored Links
    #2  
Old 04-21-2002
mikek147 mikek147 is offline
Registered User
 
Join Date: Feb 2002
Last Activity: 29 April 2004, 3:13 PM EDT
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
mget allows you to use wildcard characters in file names, then asks whether this file is the one you want. mget/mput is just a somewhat semi-automated way to transfer multiple files with one command. It's really no different than requesting one file at a time with get/put, no connections are disconnected/reconnected. -mk
Sponsored Links
    #3  
Old 04-21-2002
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 21 October 2014, 6:42 PM EDT
Location: Asia pacific region
Posts: 13,023
Thanks: 522
Thanked 877 Times in 402 Posts
ftp -i

FYI:

ftp -i turns off the need to interact with ftp when doing an mget, etc. From the man page:

Quote:
-i Turns off interactive prompting during multiple file transfers.
    #4  
Old 04-22-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 20 October 2014, 3:15 PM EDT
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 437 Times in 261 Posts
I must disagree with mikek147. The ftp protocol has a control socket and a data socket. The control socket stays open for the entire session. This is how you send commands to the server. But a data socket is opened for each file. I would not use the term "disconnect". But with each data socket, one side is writing the data and the other side is reading the data. When the entire file has been sent, the writer closes the socket. This causes the reader to see end-of-file with the next read. The reader then closes its end of the socket. If another file is to be transferred, another data socket will be opened.
Sponsored Links
    #5  
Old 04-23-2002
mikek147 mikek147 is offline
Registered User
 
Join Date: Feb 2002
Last Activity: 29 April 2004, 3:13 PM EDT
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
I stand corrected. Thank you Perderabo. Sorry for the mis-info, ho_k.. -mk
Sponsored Links
    #6  
Old 04-25-2002
orca orca is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 25 April 2002, 8:52 PM EDT
Location: wichita, ks
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mget

I think if you type "prompt" in the ftp shell it will avoid asking the repetitive query.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mget help vYN UNIX for Dummies Questions & Answers 2 12-16-2011 07:15 PM
Ftp mget exclusion question jville Shell Programming and Scripting 3 10-20-2010 10:31 AM
problem with ftp mget anijan Shell Programming and Scripting 4 03-19-2010 09:41 AM
Ftp-mget infernalhell Shell Programming and Scripting 3 10-01-2009 01:31 AM
mget yls177 UNIX for Dummies Questions & Answers 2 09-16-2002 10:37 AM



All times are GMT -4. The time now is 07:59 PM.