Centos下ftp协议连接远程ftp server主机
环境说明
[root@Check3 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@Check3 ~]# uname -a Linux Check3 -.el6.x86_64 # SMP Wed Nov :: UTC x86_64 x86_64 x86_64 GNU/Linux
FTP客户端安装
[root@Check3 ~]# yum -y install ftp
连接远程ftp server
格式fit IP 端口
[root@Check3 ~]# ftp Connected to 192.168.1.10 (192.168.1.10). -##################################################### -FileZilla Server version beta -Welcome To Elements FTP ##################################################### Name (192.168.1.10:root): Admin Password required for admin Password: Logged on Remote system type is UNIX.
命令参数
显示当前FTP连接状态
ftp> status Connected to 192.168.1.10. No proxy connection. Mode: stream; Type: ascii; Form: non-print; Structure: file Verbose: on; Bell: off; Prompting: on; Globbing: on Store unique: off; Receive unique: off Case: off; CR stripping: on Ntrans: off Nmap: off Hash mark printing: off; Use of PORT cmds: on Tick counter printing: off
显示远程主机系统类型
ftp> system UNIX emulated by FileZilla
列出当前目录下的文件或目录
dir 等同于 ls
ftp> dir Entering Passive Mode (,) Opening data channel for directory listing of "/" drwxr-xr-x ftp ftp Oct WCY drwxr-xr-x ftp ftp Aug *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Nov *** drwxr-xr-x ftp ftp Nov : *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Nov : *** Successfully transferred "/" ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/" drwxr-xr-x ftp ftp Oct WCY drwxr-xr-x ftp ftp Aug *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Nov *** drwxr-xr-x ftp ftp Nov : *** drwxr-xr-x ftp ftp Dec : *** drwxr-xr-x ftp ftp Nov : *** Successfully transferred "/"
列出当前所在远程FTP路径
ftp> cd WCY CWD successful. "/WCY" is current directory. ftp> pwd "/WCY" is current directory.
在远程主机中创建目录
ftp> mkdir test "/WCY/test" created successfully ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/WCY" drwxr-xr-x ftp ftp Dec : test Successfully transferred "/WCY"
删除远程主机中的目录
ftp> rmdir test Directory deleted successfully ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/WCY" Successfully transferred "/WCY"
返回上一级
cdup 或 cd ..
改变远程主机文件权限
chmod 权限 文件
将本地一个文件传送至远程主机中
等价命令send
ftp> put /root/test.wcy /WCY/test.wcy local: /root/test.wcy remote: /WCY/test.wcy Entering Passive Mode (,) Opening data channel for file upload to server of "/WCY/test.wcy" Successfully transferred "/WCY/test.wcy" bytes sent in 3.3e-05 secs (636.36 Kbytes/sec) ftp> cd /WCY CWD successful. "/WCY" is current directory. ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/WCY" -rw-r--r-- ftp ftp Dec : test.wcy Successfully transferred "/WCY"
将本地主机中一批文件传送至远程主机
mput local-files
删除远程主机中的文件
ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/WCY" -rw-r--r-- ftp ftp Oct MySQL--.el7.x86_64.rpm-bundle.tar -rw-r--r-- ftp ftp Dec : test.wcy Successfully transferred "/WCY" ftp> delet MySQL--.el7.x86_64.rpm-bundle.tar File deleted successfully ftp> ls Entering Passive Mode (,) Opening data channel for directory listing of "/WCY" -rw-r--r-- ftp ftp Dec : test.wcy Successfully transferred "/WCY"
删除远程上的一批文件
mdelete [remote-files]
将文件从远程主机上下载到本地主机中
等价命令recv
ftp> pwd "/通用文件/linux/mysql" is current directory. ftp> .tar.gz /root/perl-.tar.gz local: /root/perl-.tar.gz remote: /通用文件/linux/mysql/perl-.tar.gz Entering Passive Mode (,) Opening data channel for file download from server of "/通用文件/linux/mysql/perl-5.10.0.tar.gz" WARNING! bare linefeeds received in ASCII mode File may not have transferred correctly. Successfully transferred "/通用文件/linux/mysql/perl-5.10.0.tar.gz" bytes received in 0.33 secs (47322.31 Kbytes/sec)
从远程主机上下载一批文件到本地主机
mget [remote-files]
退出
ftp> bye Goodbye
内容整理至网络,如遇不懂的请自行baidu
Centos下ftp协议连接远程ftp server主机的更多相关文章
- Notepad++ 连接远程 FTP 进行文件编辑
一.下载安装 Notepad++ 1.下载 Notepad++ : https://pan.baidu.com/s/1o7VrS4y 密码 : ck8a 2.安装 Notepad++ 2.1.勾选所有 ...
- centos下修改docker连接docker_host默认方式为tls方式
1.安装docker,请参考官网文档 centos下安装docker 2.安装完成应该可以使用docker的各种命令连接docker host.docker host运行在本机上,但与localhos ...
- ArcCatalog连接远程ArcGIS Server服务器
注意:本地机器登陆的用户名和密码必须与ArcGIS Server服务器上的用户名和密码完全一致,并加入到agsadmin和agsuser组中.重启电脑. (其实就是在自己的电脑上建立一个用户名,这 ...
- Ubuntu下使用vpn连接远程服务器
公司的服务器提供了vpn接入点,这样在家里也可以通过vpn连到公司的服务器里作一些事情.昨天下午申请了vpn帐号,然后先在windows下试着连接vpn服务器,一切okay,证明自己的vpn帐户没有问 ...
- centOs下的php+mysql+apache+ftp配置
在安装服务器时做了相应的笔记,这个方法是亲身经验成功的,随着版本的不断更新,也许会有一些地方不同,但是基本原理都是一样的. 1.安装CentOS 6 ,可以选择最小安装,也可以安装桌面 2.升级系统 ...
- CentOS下通过rdesktop连接Windows远程桌面
众所周知,微软的Windows提供了一种远程桌面系统(Remote Desktop),该服务的默认端口是3389,可使用户远程登录进行系统管理或作为终端服务器运行各种应用软件. 而要连接Windows ...
- CentOS下配置redis允许远程连接
1. 目的 因为想要学习redis,因此在虚拟机中安装了redis,为了实现在物理机可以访问redis,弄了好久:因此记录下来,以免忘记. 2. 环境 虚拟机:CentOS Linux release ...
- 在mac下使用终端命令通过ssh协议连接远程linux系统,代替windows的putty
指令:ssh username@server.address.com 事例:wangmingdeMacBook-Pro:~ xxxxxxxxxx$ ssh root@XXXX.net The auth ...
- Node.js使用ftp连接远程ftp服务器枚举和下载文件示例
示例代码: var Ftp = require('ftp'); var fs = require('fs'); var path = require('path'); // 首先判断参数中是否包含{d ...
随机推荐
- Spring Security OAuth2 token权限隔离
由于项目OAuth2采用了多种模式,授权码模式为第三方系统接入,密码模式用于用户登录,Client模式用于服务间调用, 所有不同的模式下的token需要用 @PreAuthorize("h ...
- 项目中整合第三方插件与SpringMVC数据格式化关于ip地址
一.Bootstrap 响应式按钮 <div calss="col-sm-2"> <button class="btn btn-default btn- ...
- Code Forces 644A Parliament of Berland
A. Parliament of Berland time limit per test1 second memory limit per test256 megabytes inputstandar ...
- 算法大神之路——排序
从今天开始,给自己立下一个目标,每天晚上写一篇算法与数据结构的博客,用来给自己以后的算法工程师的目标铺路! 今天晚上就以算法里面的排序,作为自己的第一章节吧. 排序,就是讲一组数据,按照特定的规则去调 ...
- Python可视化Matplotlib-K线图
引入类库 import matplotlib as mpl import tushare as ts import matplotlib.pyplot as plt import matplotlib ...
- IIs7下配置php
因为一个朋友的服务器是window的需要两个版本的php,一个是现在用的php5.2,现在要用一个5.3的版本,所以考虑IIS下的配置. 1.首先当然是要下载一份php了,我采用的是免安装的,很方便, ...
- mysql主从同步出现异常语句跳过错误处理
1.跳过操作: mysql>slave stop; mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1 跳过一个事务 mysql>slave st ...
- maven之jre默认配置
需要在用户或者全局settings.xml中做如下配置 例:用户配置: 添加代码: <profile> <id>jdk-1.8</id> <activatio ...
- 17.如何网页发起QQ聊天
1.被发起的QQ需要再QQ推广开启QQ在线状态http://shang.qq.com/v3/widget.html 2.html代码 <html> <head></hea ...
- 基于nodejs的websocket通信程序设计
网络程序设计无疑是nodejs + html最好用 一.nodejs的安装 1.在ubuntu上的安装 sudo apt install nodejs-legacy sudo apt install ...