how to install ftp command?

Yarden

Verified User
Joined
Nov 14, 2008
Messages
45
behezrat hashem


[root@server public_html]# ftp ***
-bash: ftp: command not found

[root@server public_html]# yum install ftp
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centosb2.centos.org
* updates: centosj.centos.org
* addons: mirror.netcologne.de
* extras: mirror.netcologne.de
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
No package ftp available.
Nothing to do
[root@server public_html]# ftp
-bash: ftp: command not found



:confused:
 
I strongly suggest installing and using "lftp".
It is a very, very powerful ftp client that can also be used just like netkit's simple ftp client (the one you are looking for).
 
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centosb2.centos.org
* updates: centosj.centos.org
* addons: mirror.netcologne.de
* extras: mirror.netcologne.de
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
No package lftp available.
Nothing to do
[root@server public_html]# ftp
-bash: ftp: command not found
 
I can see both "ftp" and "lftp" packages in the main CentOS mirror, but I don't see them in the centosb2 mirror you are using.
I am not familiar with yum nor the CentOS repository system, but I guess that mirror isn't fully synchornized; try using another one.

You can also install packages directly from http://mirror.centos.org/centos/5/os/i386/CentOS/ ; copy the lftp-* or ftp-* url and lunch `rpm -Uvh <url>`.

EDIT: oh wait, I'm wrong. They are in the centosb2 mirror too... you may want to refresh the yum available packages cache (yum update?).
 
Last edited:
i have a problem with commands in ftp..

when i type

prompt
mget *


it's download all files but don't download directories..
how can i fix it?
 
With lftp you can just run "mirror .", it will fetch the entire directory structure.

Run "help" followed by the command to get help, like "help get", "help mget", "help mirror".
Just "help" will list all commands.
 
I would use scp instead so that all the data is encrypted.
 
Best choice would be FTP via an SSH tunnel, or at least FTPS, both can be done with lftp. SCP or SFTP are too slow and limited.
SCP makes perfect sense for a batch script anyway, or any case where you want to transfer one file and time doesn't really matter.
 
SCP or SFTP are too slow and limited.

How is SCP too slow? or limited?

SCP makes perfect sense for a batch script anyway, or any case where you want to transfer one file and time

One file at a time? Do you mean one file at a time in a single scp session? All the ftp clients I have tried do the same thing.

I have yet to see anything that will transfer files in parallel in a single session. I have done it by opening multiple sessions.
 
Of course I'm talking about the sftp client, not the protocol :) if lftp supported sftp there would be no reason to use ftps.
SCP is a limited protocol instead, because you can't list, or use ASCII transfer (faster for text files), or do a large number of things FTP can like having a connect back channel for the transfer part (PASV). SFTP can't do ASCII nor PASV either as far as I know, but I'm not perfectly sure.

Anyway I think we're getting far away from Yarden's requests and the meaning of this topic.
 
Last edited:
Anyway I think we're getting far away from Yarden's requests and the meaning of this topic.

You are right. I only commented the way I did because I have never used a ftp client on linux and thought it was odd that somebody would be asking how to do that. With ftp you are limited to the user's home directory whereas with scp, if root, you can transfer files anywhere. You normally cannot login as root with ftp. So I find that scp is a lot more versatile that any kind of ftp because I can put or get files anywhere I need them.

I still recommend a combination of SCP and SSH over any kind of ftp.
 
i have a problem with commands in ftp..

when i type

prompt
mget *


it's download all files but don't download directories..
how can i fix it?

I don't think the CentOS ftp can do recursive transfers.

Using SCP woould be easy enough. scp -r
 
Back
Top