Ftp mget command ?!?!?!? (code sample) | 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 !!

Ftp mget command ?!?!?!? (code sample)

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-06-2001
Ganondorf Ganondorf is offline
Registered User
 
Join Date: Aug 2001
Last Activity: 7 August 2001, 4:58 PM EDT
Location: Saint-Georges,QC,CAN
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Ftp mget command ?!?!?!? (code sample)

Hey,
Look at the code below and tell me why part 1 doesnt download the file considering part 2 does. Hope you guys can help me. Thanks

P.S. dont be full by the uglyness of the code, it really is just 2 ftp command each....

ftp> lcd /tmp/email/zip/
Local directory now /tmp/email/zip
ftp> mget /tmp/email/body/*.*
local: /tmp/email/body/bob.tar remote: /tmp/email/body/bob.tar
200 PORT command successful.
150 Opening BINARY mode data connection for /tmp/email/body/bob.tar (10240 bytes
).
226 Transfer complete.
10240 bytes received in 0.17 seconds (59.32 Kbytes/s)
local: /tmp/email/body/dfbody.txt remote: /tmp/email/body/dfbody.txt
/tmp/email/body/dfbody.txt: Not owner
local: /tmp/email/body/disclaimer.txt remote: /tmp/email/body/disclaimer.txt
/tmp/email/body/disclaimer.txt: Not owner
local: /tmp/email/body/sendmail.txt remote: /tmp/email/body/sendmail.txt
/tmp/email/body/sendmail.txt: Not owner


ftp> cd /tmp/email/body/
250 CWD command successful.
ftp> mget *.*
local: bob.tar remote: bob.tar
200 PORT command successful.
150 Opening BINARY mode data connection for bob.tar (10240 bytes).
226 Transfer complete.
10240 bytes received in 0.16 seconds (60.63 Kbytes/s)
local: dfbody.txt remote: dfbody.txt
200 PORT command successful.
150 Opening BINARY mode data connection for dfbody.txt (351 bytes).
226 Transfer complete.
351 bytes received in 0.00 seconds (1102.17 Kbytes/s)
local: disclaimer.txt remote: disclaimer.txt
200 PORT command successful.
150 Opening BINARY mode data connection for disclaimer.txt (795 bytes).
226 Transfer complete.
795 bytes received in 0.00 seconds (2705.11 Kbytes/s)
local: sendmail.txt remote: sendmail.txt
200 PORT command successful.
150 Opening BINARY mode data connection for sendmail.txt (1345 bytes).
226 Transfer complete.
1345 bytes received in 0.00 seconds (4306.48 Kbytes/s)
Sponsored Links
    #2  
Old 08-06-2001
ober5861's Avatar
ober5861 ober5861 is offline
Registered User
 
Join Date: Jul 2001
Last Activity: 4 March 2003, 2:05 PM EST
Location: Gettysburg, PA
Posts: 116
Thanks: 0
Thanked 1 Time in 1 Post
Someone yell at me if I'm off the wall here, but I think that the FTP get and mget commands only work in the current directory. I think your problem is that you're trying to get files out of a different directory than what your "pwd" is and I'm not sure that it can do this. I don't think directory location is a valid argument. (Yes, that is a retarded protocol, but I'm pretty sure that's how it works)
Sponsored Links
    #3  
Old 08-06-2001
kristy kristy is offline
Registered User
 
Join Date: May 2001
Last Activity: 15 May 2007, 10:18 AM EDT
Location: Allentown, PA
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
I was thinking the same thing, that mget only works in the current directory. I always cd to the full path and use mget from there. For example:

cd /dir1/subdir1/subdir2
mget *.txt
    #4  
Old 08-06-2001
Ganondorf Ganondorf is offline
Registered User
 
Join Date: Aug 2001
Last Activity: 7 August 2001, 4:58 PM EDT
Location: Saint-Georges,QC,CAN
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Well DOS ftp works fine with full path.... But if you guys say UNIX ftp doesn't support it, thats fine. Thats what i want to know. Is it normal or not that it does that?....
Sponsored Links
    #5  
Old 08-06-2001
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 24 July 2014, 5:57 PM EDT
Location: Asia pacific region
Posts: 12,989
Thanks: 513
Thanked 868 Times in 397 Posts
mget can get subdirectories if everything is set up properly. mget does not create directories on your local machine. mget does not circumvent normal permissions and access control mechanisms.
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
Can't use Text::CSV... any sample code out there? mrwatkin Shell Programming and Scripting 1 09-25-2009 08:14 AM
No return code in ftp mget script dog123 Shell Programming and Scripting 1 04-27-2009 09:28 AM
mget command scorpio Shell Programming and Scripting 4 04-30-2008 01:00 AM
mget (ftp command) Ganondorf UNIX for Dummies Questions & Answers 2 08-03-2001 04:01 PM



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