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 06-11-2009, 11:25 PM   #1
Sander-Rob
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
FTP Transfer


I have a CentOS machine I'm connected to via SSH. I need to FTP multiple directories and files over to another machine.

When I get to the 'put' command, how do I sent everything within a particular directory, and in turn it's child directories, to the FTP server?
 
Old 06-11-2009, 11:28 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
man page. Though if ssh exists, why not use scp? FTP is notoriously insecure and almost completely outdated.
 
Old 06-11-2009, 11:33 PM   #3
Sander-Rob
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I'm just transferring files between two machines on the same network.

Can I use SCP to connect to an FTP server? I've only used SCP to connect to another Linux machine. The FTP server I'm trying to connect to is on a Windows machine.
 
Old 06-11-2009, 11:34 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Oh, okay, fair enough. But still, the FTP man page should be the first place you look for this
 
Old 06-11-2009, 11:41 PM   #5
Sander-Rob
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I looked through it. When I do the following, I get the sub-directories, but I don't get their subdirectories and/or contents.

Example:

# ftp 192.168.1.2
# mput
# directory/*

It then asks me to confirm sending the contents of directory/, but not /directory/child/ etc..

If I use 'ftp -i' it shouldn't ask me to confirm each file, but I don't see a location within the man file that says anything about recursively copying the contents of a directory. Am I missing something?
 
Old 06-12-2009, 01:57 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
AFAIK, there's no recursive option on FTP. you could try either

1. mput */*

or

2, create an MS equiv of a tar file and put that. If you've got Cygwin on the MS box (or can put it on) that would work for tar.
Else some kind of zip file I think (me no use MS)
 
  


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
Transfer using ftp command john_smith Linux - Newbie 7 12-03-2007 03:03 AM
Ftp freezes up during transfer GeneralChaos Slackware 2 10-04-2005 09:52 PM
FTP transfer jams! 3p0ch Linux - Networking 1 07-21-2005 09:07 AM
Auto FTP transfer madunix *BSD 0 02-29-2004 03:57 PM
FTP transfer speed twantrd Linux - General 0 04-08-2003 11:08 PM


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