查看sftp的使用-本地与远程服务器之间的文件传输

sftp  时间:2021-01-25  阅读:()

如何将本地pc上的文件通过sftp上传到linux服务器如何将linux服务器上的文件下载到本地pc上

SecureC RT 工具 1、 打开会话窗口

2、 设置服务器设置本地PC的目录

这个地址用于将该目录下的文件进行上传到lin u x服务器或把linux上的文件下载到该目录下

3、 打开sftp窗口或者使用Alt+P快捷键打开sftp窗口

4、 在sftp窗口执行命令help查看sftp可使用的命令sftp>help

Available commands:

1

ascii Set transfermode toASCII (设置文件传输模式为 ascii) binarySet transfer mode to binary(设置文件传输模式为二进制)cdpath Change remote directory to „path‟(这个就不用说了吧~ ) detail remote-path Displaysystem information about remotefile or folder(查看远程服务器上的文件夹详细信息咯)例子sftp> detail~/huqin /home/mmap/huqin: Type:Directory

Size:280uid/gid:500/500 uid/gid:500/500

Last Modification Time: October 16, 2014 10:35:28Last Access Time : October 16, 2014 10:36:18Permissions:drwxrwxr-x sftp>ldetail local-path Display system informationabout localfile o r fo lde r(查看本地pc上的文件夹详细信息咯)例子

C:/Users/Administrator/Desktop/snak: Type:DirectorySize:4096

Create Time :October 14, 2014 14:31:54

2

Last Modification Time:October 16,201410:35:48 LastAccess Time : October 16, 2014 10:35:48 FileAttributes:no-attributes Link Count: 1 sftp>lcd path Change local directory to „path‟(专用于改变本地目录用的喽) 例子sftp>lpwd

C:/Users/Administrator/Desktop/snak #当前本地目录sftp> lcd E:\\Work #改变本地目录为E:\\Work sftp>lpwd #当前本地目录E:/Work sftp>chgrp group path Change group of file „path‟ to„group‟ (改变path所属的组喽) chmod mode pathChange permissions of file„path‟to„mode‟

(这个也不用说了吧 改变权限w/r/x之类的了)chown owner path Change owner of file „path‟ to„owne r‟( 改 变 档 案 的 拥 有 者 咯 ) exitQuit sftphelp Displaythis helptextinclude filename Include commands from„filename‟ Alternate: get[-a| -b] remote-path Download fileforce ascii(-a)or binary(-b)

3

mode

例子将我的linux服务器的~/testDir下的文件下载到本地pc上sftp>pwd /home/mmapsftp>cd~/testDir sftp>pwd

/home/mmap/testDir sftp>lpwd

C:/Users/Administrator/Desktop/snak sftp>llscontral.txt worm.txtsftp>get -a testFile #-a  以ascii方式下载 -b以二进制方式下载 Downloading testFile from/home/mmap/testDir/testFile 100%283 bytes 283bytes/s 00:00:00

/home/mmap/testDir/testFile: 283 bytes transferred in 0seconds(283 bytes/s)sftp>lls #查看本地目录下多了个文件吧contral.txt testFile worm.txtsftp>ln[-s] existingpath linkpath Hardlink/ symlink remotefile(不说了 就是个普通的链接命令) ls [optio ns] [pat h]Display remote directory listing(不说了就是个ls命令) lls[options] [path] Display local directory

4

listing(专门查看本地目录而用的啦) mkdir pathCreate remote directory(不说了就是个创建文件夹命令)lmkdir path Create local directory(专门创建本地目录而用的啦) mv oldpath newpathMove remote file open [user@]host[:port] Connectto remote host put [-a| -b] local-path Upload fileforce ascii (-a)or binary(-b)mode

例子将本地pc上的文件以ascii方式上传到我的linux服务器的~/testDir下sftp>pwd #查看当前服务器路径/home/mmapsftp> cd ~/testDir #进入要上传到服务的路径sftp>pw d

/home/mmap/testDirsftp> lpwd #查看当前本地pc 的路径

C:/Users/Administrator/Desktop/snaksftp>lls #查看本地pc路径下的文件contral.txtworm.txtsftp>put -a wo rm.txt

#这里没有指定wo rm.txt的路径 因为会话窗口中已经配置 了 这个路径 Uploading worm.txt to

5

/home/mmap/testDir/worm.txt 100%0 bytes 0 bytes/s

00:00:00sftp> put -a

C:/Users/Administrator/Desktop/snak/contral.txt Uploadingcontral.txt to /home/mmap/testDir/contral.txt 100%0bytes 0bytes/s00:00:00sftp>ls-l w*c* #查看服务器下文件上传成功否

-rw-rw-r--mmap mmap 0 Oct 14, 2014

14:32 worm.txt -rw-rw-r--mmap mmap 0Oct 14,201414:32 contral.txt sftp>pwd Display remote workingdirectory lpwd Print localworking directory quit Quitsftprmdir path lrmdir path rmpath lrm path suuse rnametype [transfer-mode] view remote-path version

Remove remote directory Remove localdirectory Delete remote file Delete local file

Substitutes the current user

6

This is only supported with VShell forWindows 3.5 or later.

Display or set file transfer mode(查看文件传输方式ascii或二进制) Download and open file Display protocolversion

百度搜索“就爱阅读”,专业资料、生活学习,尽在就爱阅读网92to.com,您的在线图书馆!

7

hostodo:2021美国独立日7折优惠促销NVMe硬盘的VPS,低至$13/年,还送DirectAdmin授权

7月4日是美国独立日,大致就是国庆节的意思吧。hostodo今年提前搞了个VPS大促销活动,4款便宜VPS,相当于7折,续费不涨价,本次促销不定时,不知道有多少货,卖完为止。VPS基于KVM虚拟,NVMe阵列,1Gbps带宽,自带一个IPv4+/64 IPv6,solusvm管理,送收费版DirectAdmin授权,VPS在用就有效! 官方网站:https://www.hostodo.com ...

速云:深圳独立服务器,新品上线,深港mpls免费体验,多重活动!

速云怎么样?速云是一家国人商家。速云商家主要提供广州移动、深圳移动、广州茂名联通、香港HKT等VDS和独立服务器。目前,速云推出深圳独服优惠活动,机房为深圳移动机房,购买深圳服务器可享受5折优惠,目前独立服务器还支持申请免费试用,需要提交工单开通免费体验试用,次月可享受永久8折优惠,也是需工单申请哦!点击进入:速云官方网站地址活动期限至 2021年7月22日速云云服务器优惠活动:活动1:新购首月可...

久久网云-目前最便宜的国内,香港,美国,日本VPS云服务器19.9元/月起,三网CN2,2天内不满意可以更换其他机房机器,IP免费更换!。

久久网云怎么样?久久网云好不好?久久网云是一家成立于2017年的主机服务商,致力于为用户提供高性价比稳定快速的主机托管服务,久久网云目前提供有美国免费主机、香港主机、韩国服务器、香港服务器、美国云服务器,香港荃湾CN2弹性云服务器。专注为个人开发者用户,中小型,大型企业用户提供一站式核心网络云端服务部署,促使用户云端部署化简为零,轻松快捷运用云计算!多年云计算领域服务经验,遍布亚太地区的海量节点为...

sftp为你推荐
软银收购arm英国的ARM 芯片公司宣布同中国芯片全面合作吗?莫代尔和纯棉哪个好纯棉含莫代尔和100%莫代尔哪个好华为p40和mate30哪个好荣耀30pro和华为P40哪个好?等额本息等额本金哪个好等额本金和等额本息哪个划算?如果想在5-10年内还清贷款哪类更划算一些?手机音乐播放器哪个好手机音乐播放器音质好的APP是那款oppo和vivo哪个好vivo和oppo哪个更耐用牡丹江教育云空间登录云端学习如何登录?360云盘360云盘干什么用的?360云查杀360手机安全卫士的云查杀功能是否可靠?360云u盘360云u盘无法连接怎么回事?
金万维动态域名 唯品秀 wdcp typecho 三拼域名 gg广告 新天域互联 共享主机 免费吧 vip购优惠 国外免费asp空间 789电视剧 跟踪路由命令 万网主机管理 韩国代理ip 东莞服务器托管 国外的代理服务器 摩尔庄园注册 腾讯数据库 数据湾 更多