当前位置:首页 » 文件管理 » linuxftp命令

linuxftp命令

发布时间: 2022-01-31 12:19:48

linux只安装vsftpd就能使用ftp命令

linux不需要安装vxftpd也可以使用ftp命令(FTP客户端)。

在大多发行版都有打包,请到各大发行版的ftp列表中得到,或者在发行版的安装盘中也能得到。lftp是一个命令行式的ftp客户端。对中文支持较好。如果您在linux 的text模式下,要安装zhcon或者cce之类的。

安装:

1、RPM包管理的系统,请到

http://freshrpms.net
http;//rpmfind.net 上查找lftp的最新包,可以用

#rpm -ivh name.rpm
#rpm -Uvh name.rpm 这是升级之用

2、源码包安装举例:lftp-3.2.0.tar.bz2

#tar zxvf lftp-3.2.0.tar.bz2
#cd lftp-3.2.0
#./configure
#make
#make install

3.调用方法:

lftp ftp://用户名:密码@地址

比如:
[beinan@S01~]$lftp ftp://[email protected]
口令:
lftp [email protected]:~>
lftp [email protected]:~>ls

-rw-r--r-- 1 1000 100 44387 May 18 10:04 xvmain.jpg
-rw-r--r-- 1 1000 100 202643 May 18 09:45 xxx.jpeg
-rw-r--r-- 1 1000 100 0 May 20 10:01 鲨鱼的故事.txt

二、使用方法:

0.简单的用法:lcd 切换本地目录,比如 lcd /opt
get 取回一个文件,put 向ftp服务器传文件;

1、获得帮助:

代码:

lftp [email protected]:~> help
!<shell-command>(commands)
alias [<name> [<value>]]anon
bookmark [SUBCMD] cache [SUBCMD]
cat [-b] <files>cd <rdir>
chmod [OPTS] mode file... close [-a]
[re]cls [opts] [path/][pattern] debug [<level>|off] [-o <file>]
[options] <dirs> exit [<code>|bg]
get [OPTS] <rfile> [-o <lfile>] glob [OPTS] <cmd> <args>
help [<cmd>]history -w file|-r file|-c|-l [cnt]
jobs [-v] kill all|<job_no>
lcd <ldir>lftp [OPTS] <site>
ls [<args>] mget [OPTS] <files>
mirror [OPTS] [remote [local]]mkdir [-p] <dirs>
mole name [args]more <files>
mput [OPTS] <files> mrm <files>
mv <file1> <file2>[re]nlist [<args>]
open [OPTS] <site>pget [OPTS] <rfile> [-o <lfile>]
put [OPTS] <lfile> [-o <rfile>] pwd [-p]
queue [OPTS] [<cmd>]quote <cmd>
repeat [delay] [command]rm [-r] [-f] <files>
rmdir [-f] <dirs> scache [<session_no>]
set [OPT] [<var> [<val>]] site <site_cmd>
source <file> user <user|URL> [<pass>]
version wait [<jobno>]
zcat <files>zmore <files>

如果针对lftp的每个命令的帮助,应该是:

lftp [email protected]:~> help 命令

比如

代码:
lftp [email protected]:~> help get

用法: get [OPTS] <rfile> [-o <lfile>]

Retrieve remote file <rfile> and store it to local file <lfile>.
-o <lfile> specifies local file name (default - basename of rfile)
-ccontinue, reget
-Edelete remote files after successful transfer
-ause ascii mode (binary is the default)
-O <base> specifies base directory or URL where files should be placed

简介:gftp基于gtk的ftp客户端,大家用的也比较多吧,支持中文目录。如果您的gftp不能支持中文,请升级版本。

# Written in C and has a text interface and a GTK+ 1.2/2.x interface
# Supports the FTP, FTPS (control connection only), HTTP, HTTPS, SSH and FSP protocols
# FTP and HTTP proxy server support
# Supports FXP file transfers (transferring files between 2 remote servers via FTP)
# Supports UNIX, EPLF, Novell, MacOS, VMS, MVS and NT (DOS) style directory listings
# Bookmarks menu to allow you to quickly connect to remote sites

下载安装:

在各大发行版中,都有gftp的打包,可以用各发行版自带的工具来安装。我只说源码包安装:

源码包安装,通用于所有发行版,举例说明:gftp-2.0.18.tar.bz2

代码:
[root@S01ftp]#ls -lh

总用量 1.4M

-rw-r--r--1 root root 1.4M 2005-05-21 09:18 gftp-2.0.18.tar.bz2
[root@S01ftp]#tar jxvf gftp-2.0.18.tar.bz2
[[email protected]]#./configure
[[email protected]]#make
[[email protected]]#make install

注:因为gftp依赖gtk,如果不能make过去,您应该指定PKG_CONFIG_PATH

[[email protected]]# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

调用:

代码:

[[email protected]]#gftp

② linux 下面怎么使用ftp 命令

如果你知道你需要访问的ftp的地址的话,直接使用ftp就可以了
ftp IP地址
然后他会提示你输入用户名和密码,输入正确就登录ftp了
然后就可以通过put和get命令上传和下载文件了

③ Linux 下ftp命令问题。

# $1 = Remote host
# $2 = Remote user
# $3 = Remote password
# $4 = Remote directory
ftp -n -i << EOF
open $1
user $2 $3
cd $4
ls
close
bye
EOF

# $1 = FTP host
# $2 = FTP user
# $3 = FTP password
# $4 = 1st directory/file name
# $5 = 2nd directory/file name
# $6 = get / put
ftp -n -i << EOF
open $1
user $2 $3
binary
$6 $4 $5
close
bye
EOF

④ linux如何用 ftp 命令实现把一个文件传到服务器里面的某个文件夹

put 只能上传单个文件,
如果要上传文件夹,就用 mirror命令
mirror -R file

⑤ linux 使用ftp命令 提示没有命令是怎么回事 限制的那个文件root是带#的 v什么

ftp可以与windows上传和下载文档使用的一个命令,呵呵。在cmd中,输入ftp即可开始连接,详细方法可以参考其他文档。

⑥ linux ftp 命令 mdelete *.txt报错

必须获得文件列表,然后针对文件列表进行删除,所有FTP软件都是这么做的,都是先获取文件列表,并生成数组。
每次操作后都要刷新文件列表。

在FTP里help一下mdelete命令,看看文件格式吧。
先执行prompt命令,然后再mdelete
到当前路径执行 mdelete *.fileName
或者直接执行delete *.txt

最简单的办法就是找个ftp客户端软件登陆上去全选删除。

或这个给你个脚本,试试吧,这是linux下的脚本,把中文的地方改成相应的东西,复制一下,在linux里vi一个新文件,粘贴,保存退出,直接./新文件名就自动执行了

while read filename(你的文件列表文件名)
do
ftp -i -n 服务器ip <<EOF
cd 目录
delete $filename
quit
EOF

done <

⑦ 我的linux里没有ftp命令.怎么安装

Linux中的ftp服务器一般是安装vsftp。以centos为例,具体操作如下: 1、运行yum install vsftpd命令 命令具体的细节如下: [[email protected]]# yum install vsftpd Setting up Install Process Parsing package install arguments Resolving Dep...

⑧ linux下ftp命令详解

ftp(file transfer protocol)
功能说明:设置文件系统相关功能。
语法:ftp [-dignv][主机名称或IP地址]
补充说明:FTP是ARPANet的标准文件传输协议,该网络就是现今Internet的前身。
参数: 《Linux就该这么学》
-d 详细显示指令执行过程,便于排错或分析程序执行的情形。

-i 关闭互动模式,不询问任何问题。
-g 关闭本地主机文件名称支持特殊字符的扩充特性。
-n 不使用自动登陆。
-v 显示指令执行过程。
1. 连接ftp服务器
格式:ftp [hostname| ip-address]
a)在linux命令行下输入:
ftp 192.168.1.1
b)服务器询问你用户名和密码,分别输入用户名和相应密码,待认证通过即可。
c)也可以先输入ftp
ftp>
d)然后在输入要连接的IP
ftp>open 192.168.1.1
2. 下载文件
下载文件通常用get和mget这两条命令。
a) get
格式:get [remote-file] [local-file]
将文件从远端主机中传送至本地主机中。
如要获取远程服务器上/usr/your/1.htm,则
ftp> get /usr/your/1.htm 1.htm (回车)

b) mget
格式:mget [remote-files]
从远端主机接收一批文件至本地主机。
如要获取服务器上/usr/your/下的所有文件,则
ftp> cd /usr/your/
ftp> mget *.* (回车)

此时每下载一个文件,都会有提示。如果要除掉提示,则在mget *.* 命令前先执行:prompt off
注意:文件都下载到了linux主机的当前目录下。比如,在/usr/my下运行的ftp命令,则文件都下载到了/usr/my下。
3.上传文件
a) put
格式:put local-file [remote-file]
将本地一个文件传送至远端主机中。
如要把本地的1.htm传送到远端主机/usr/your,并改名为2.htm
ftp> put 1.htm /usr/your/2.htm (回车)

b) mput
格式:mput local-files
将本地主机中一批文件传送至远端主机。
如要把本地当前目录下所有html文件上传到服务器/usr/your/ 下
ftp> cd /usr/your (回车)
ftp> mput *.htm(回车)

热点内容
util文件夹 发布:2024-10-21 03:20:23 浏览:201
酷狗音乐怎样上传作品 发布:2024-10-21 03:16:30 浏览:609
eclipsephp搭建 发布:2024-10-21 03:14:00 浏览:331
cwindowslinux 发布:2024-10-21 03:05:53 浏览:726
剑网三编程 发布:2024-10-21 02:53:47 浏览:838
c语言题库app 发布:2024-10-21 02:52:32 浏览:622
王牌战争服务器没人是什么情况 发布:2024-10-21 02:52:27 浏览:11
反斜杠c语言 发布:2024-10-21 02:44:30 浏览:898
安卓转网页后端开发需要学什么 发布:2024-10-21 02:42:55 浏览:256
冰箱压缩机做空调 发布:2024-10-21 02:42:55 浏览:2