Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-01-2008, 11:15 AM   #1
LQ Newbie
Registered: May 2008
Posts: 20

Rep: Reputation: 0
send files and folder ftp

I wanted to send a ftp to another folder of all files and a directory
I only send files using the:

>ftp mput *.*
Old 08-01-2008, 11:21 AM   #2
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
Not sure exactly what you are asking - I think you want to use FTP to access a remote server. You can use the command line but I think the easiest is to use a graphical client like konqueror. Just type then enter your username and password and you have a connection to the FTP server.
Old 08-01-2008, 11:42 AM   #3
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
I'm not totally sure what you're asking, but, generally, ftp is a file transfer protocol and won't conveniently transfer recursively; i.e., it won't "walk a tree."

If you want to send a tree -- files, directories and the like -- with ftp, it's easiest to use the tar utility to create an archive file (and, possibly, use the gzip utility to compress the tar file to cut down transfer time); something like this
tar -cvf dirname.tar dirname
[optional: gzip dirname.tar]
ftp -i server
cd parent_directory_name_on_remote
put dirname.tar [or put dirname.tar.gz]
At the other end, dirname.tar.gz is unzipped and extracted (with tar) and the directory tree is then available.

If you're simply copying a bunch of files, that might be done
ftp -i server
cd parent_directory_name_on_remote
mput *.*
The "-i" option to ftp is important for the mget and mput options.

An option worth considering is scp. If you have ssh configured between machines, you can simply recursively copy files and directories in one go using scp.

Hope this helps some.
Old 08-01-2008, 12:13 PM   #4
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,098

Rep: Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381Reputation: 4381
Originally Posted by infonlinebr View Post
I wanted to send a ftp to another folder of all files and a directory
I only send files using the:

>ftp mput *.*
I'm not sure what you're asking either, but I think you want to recursively send an entire directory, plus sub-directories, via FTP.

SCP is more secure, and handles recursion. "scp -r <directory you want to send> <user id>@<ip address of remote server>:<path you want to copy to>"


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
Thunar 'Send-to folder' entry? jukebox55 Linux - Software 2 02-19-2008 03:38 PM
files not visible in ftp site (but present in the /var/ftp/folder of the server) dongrila Linux - Newbie 2 12-23-2007 10:09 PM
How to tar a folder and send it in FTP on another server ? SethShannon Linux - Newbie 2 09-28-2007 01:27 AM
Is there a way to send files to a friend, similar to MSN send file protocol? pablom Linux - Networking 1 05-07-2007 10:16 PM
How to automatically move files from one folder into another folder? xmrkite Linux - Software 6 11-05-2006 10:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration