查看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

pia云低至20/月,七折美国服务器

Pia云是一家2018的开办的国人商家,原名叫哔哔云,目前整合到了魔方云平台上,商家主要销售VPS服务,采用KVM虚拟架构 ,机房有美国洛杉矶、中国香港和深圳地区,洛杉矶为crea机房,三网回程CN2 GIA,带20G防御,常看我测评的朋友应该知道,一般带防御去程都是骨干线路,香港的线路也是CN2直连大陆,目前商家重新开业,价格非常美丽,性价比较非常高,有需要的朋友可以关注一下。活动方案...

舍利云30元/月起;美国CERA云服务器,原生ip,低至28元/月起

目前舍利云服务器的主要特色是适合seo和建站,性价比方面非常不错,舍利云的产品以BGP线路速度优质稳定而著称,对于产品的线路和带宽有着极其严格的讲究,这主要表现在其对母鸡的超售有严格的管控,与此同时舍利云也尽心尽力为用户提供完美服务。目前,香港cn2云服务器,5M/10M带宽,价格低至30元/月,可试用1天;;美国cera云服务器,原生ip,低至28元/月起。一、香港CN2云服务器香港CN2精品线...

欧路云(22元/月),美国CERA弹性云服务器!香港弹性云服务器15元/月起;加拿大高防vps仅23元/月起

欧路云怎么样?欧路云主要运行弹性云服务器,可自由定制配置,可选加拿大的480G超高防系列,也可以选择美国(200G高防)系列,也有速度直逼内地的香港CN2系列。所有配置都可以在下单的时候自行根据项目 需求来定制自由升级降级 (降级按天数配置费用 退款回预存款)。2021年7月14日美国 CERA 弹性云服务器 上新 联通CUVIP 线路!8折特惠中!点击进入:欧路云官方网站地址付款方式:PayPa...

sftp为你推荐
秦殇内存修改器秦殇修改器一点读取属性就卡了郑州软银科技有限公司河南比较出名的营销公司是哪家?我们下半年有新产品上市需要做一些推广输入法哪个好用五笔输入法哪个最好用麒麟990和骁龙865哪个好海思麒麟990和骁龙710哪个好?燃气热水器和电热水器哪个好燃气热水器与电热水器的优缺点?迈腾和帕萨特哪个好新帕萨特怎么样 迈腾和帕萨特哪个好苹果手机助手哪个好最新版iphone助手 PP助手好用吗?网页传奇哪个好玩哪个传奇类网页游戏即好玩又不花钱??网校哪个好哪个网校比较好?红茶和绿茶哪个好红茶和绿茶哪个比较好?
联通c套餐 rackspace 轻博客 174.127.195.202 好看的留言 12306抢票攻略 win8升级win10正式版 12306抢票助手 警告本网站 193邮箱 河南移动邮件系统 hinet 秒杀汇 河南移动网 vip购优惠 太原网通测速平台 web服务器安全 新加坡空间 免费网络 lamp什么意思 更多