Fedora Linux Support Community & Resources Center
  #1  
Old 17th October 2008, 04:10 PM
DanSandberg Offline
Registered User
 
Join Date: Dec 2007
Posts: 21
Recursive FTP

Hi All,

I have a stupid question. I need to upload an entire hierarchy of files, folders within folders, etc.. Everything is located inside this one folder but the "get" command with FTP "can't get non-regular file". How do I get the entire folder and everything inside in a recursive way? get -R didn't work.

Thanks,
Dan
Reply With Quote
  #2  
Old 17th October 2008, 04:15 PM
Nokia's Avatar
Nokia Offline
Registered User
 
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286
Try mget instead of get
__________________
For safer browsing, use OpenDNS nameservers 208.67.222.222 and 208.67.220.220

SELinux User Guide

AutoPager
Reply With Quote
  #3  
Old 17th October 2008, 04:45 PM
aleph's Avatar
aleph Offline
Banned (for/from) behaving just like everybody else!
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307
I'd suggest using lftp (yum install lftp). It is a very flexible FTP client. With its "mirror" command you can download/upload entire directory hierarchies in a few keystrokes.

The "mirror" command by default only does the download. "mirror -R" does the reverse (putting files *to* the server). In lftp, the command "help mirror" tells you whole lots of useful information.
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.

Last edited by aleph; 17th October 2008 at 04:49 PM. Reason: Typo/addenda
Reply With Quote
  #4  
Old 17th October 2008, 05:11 PM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
I've only had experience with transferring between networks, so don't know how different that is to transferring to/from a server, but could you not use "scp -r"
Reply With Quote
  #5  
Old 17th October 2008, 05:35 PM
DanSandberg Offline
Registered User
 
Join Date: Dec 2007
Posts: 21
Okay - what I'm actually trying to do is upload webpage information from my mac to the linux server hosting the webpage. I ssh into the server and then sftp back to my own computer. Mget produced the same error as get, 'could not open non-regular file'. scp -r isn't a valid command and for some reason yum isn't recognized either.

Could I compress the folder into a single object, ftp it to the linux server, and then decompress it? If so, does anyone know what compression software I'd need for this (a free program would be ideal)
Reply With Quote
  #6  
Old 17th October 2008, 05:46 PM
Nokia's Avatar
Nokia Offline
Registered User
 
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286
Take a good look at
Code:
man scp
before trying anything else

Your answer is:
Code:
 scp -2vr local/folder user@linuxserver.com:
That should be all

P.S. Take a look at
Code:
su
yum install sshfs
man sshfs
__________________
For safer browsing, use OpenDNS nameservers 208.67.222.222 and 208.67.220.220

SELinux User Guide

AutoPager

Last edited by Nokia; 17th October 2008 at 05:49 PM.
Reply With Quote
  #7  
Old 17th October 2008, 05:47 PM
php1ic Offline
Registered User
 
Join Date: Oct 2008
Location: London - England
Posts: 137
Sorry, I thought scp was a standard command. I'm also under the impression that tar is so sorry in advance if it isn't recognised.

tar cvzf dir.tar.gz dir/

will compress and tar the directory into a single file (dir.tar.gz) which you can transfer

tar xvzf dir.tar.gz

should then uncompress and untar the file.
Reply With Quote
  #8  
Old 17th October 2008, 06:01 PM
Nokia's Avatar
Nokia Offline
Registered User
 
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286
Quote:
Originally Posted by php1ic View Post
Sorry, I thought scp was a standard command. I'm also under the impression that tar is so sorry in advance if it isn't recognised.

tar cvzf dir.tar.gz dir/

will compress and tar the directory into a single file (dir.tar.gz) which you can transfer

tar xvzf dir.tar.gz

should then uncompress and untar the file.
Right. However, it's not needed in this case.
Code:
scp -2vrC
will enable compression when transfering files. There's no point in creating a local archive and decompressing it remotely. (Wonder if he's allowed to do that )
__________________
For safer browsing, use OpenDNS nameservers 208.67.222.222 and 208.67.220.220

SELinux User Guide

AutoPager
Reply With Quote
  #9  
Old 17th October 2008, 06:10 PM
DanSandberg Offline
Registered User
 
Join Date: Dec 2007
Posts: 21
Hi great. scp seems to be the answer, although tar would work too. Thanks alot!
Reply With Quote
Reply

Tags
ftp, recursive

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux and recursive algorithms? voltrem Fedora Focus 2 20th October 2008 03:36 PM
PHP and recursive row creation cypher543 Programming & Packaging 1 21st December 2006 06:20 AM
chmod --recursive kamran_pro Using Fedora 5 18th August 2006 04:10 AM
RPM recursive dependencies!!!! nemesys Using Fedora 6 15th December 2005 03:58 PM


Current GMT-time: 07:14 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat