 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

17th October 2008, 04:10 PM
|
|
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
|

17th October 2008, 04:15 PM
|
 |
Registered User
|
|
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286

|
|
|
Try mget instead of get
|

17th October 2008, 04:45 PM
|
 |
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
|

17th October 2008, 05:11 PM
|
|
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"
|

17th October 2008, 05:35 PM
|
|
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)
|

17th October 2008, 05:46 PM
|
 |
Registered User
|
|
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286

|
|
Take a good look at 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
Last edited by Nokia; 17th October 2008 at 05:49 PM.
|

17th October 2008, 05:47 PM
|
|
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.
|

17th October 2008, 06:01 PM
|
 |
Registered User
|
|
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286

|
|
Quote:
Originally Posted by php1ic
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. 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  )
|

17th October 2008, 06:10 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 21

|
|
|
Hi great. scp seems to be the answer, although tar would work too. Thanks alot!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 07:14 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|