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

Virtono:圣何塞VPS七五折月付2.2欧元起,免费双倍内存

Virtono是一家成立于2014年的国外VPS主机商,提供VPS和服务器租用等产品,商家支持PayPal、信用卡、支付宝等国内外付款方式,可选数据中心共7个:罗马尼亚2个,美国3个(圣何塞、达拉斯、迈阿密),英国和德国各1个。目前,商家针对美国圣何塞机房VPS提供75折优惠码,同时,下单后在LET回复订单号还能获得双倍内存的升级。下面以圣何塞为例,分享几款VPS主机配置信息。Cloud VPSC...

HostYun 新增美国三网CN2 GIA VPS主机 采用美国原生IP低至月15元

在之前几个月中也有陆续提到两次HostYun主机商,这个商家前身是我们可能有些网友熟悉的主机分享团队的,后来改名称的。目前这个品牌主营低价便宜VPS主机,这次有可以看到推出廉价版本的美国CN2 GIA VPS主机,月费地址15元,适合有需要入门级且需要便宜的用户。第一、廉价版美国CN2 GIA VPS主机方案我们可看到这个类型的VPS目前三网都走CN2 GIA网络,而且是原生IP。根据信息可能后续...

麻花云:3折优惠,香港CN2安徽麻花云香港安徽移动BGP云服务器(大带宽)

麻花云在7月特意为主机测评用户群定制了促销活动:香港宽频CN2云服务器、安徽移动云服务器(BGP网络,非单线,效果更好)、安徽移动独立服务器、安徽电信独立服务器,全部不限制流量,自带一个IPv4,默认5Gbps的DDoS防御。活动链接:https://www.mhyun.net/act/zjcp特价云服务器不限流量,自带一个IPv4,5Gbps防御香港宽频CN2全固态Ⅲ型 4核4G【KVM】内存:...

sftp为你推荐
笔记本1g内存条价格电脑1G的内存条价钱大概是多少左右?麒麟990和骁龙865哪个好骁龙八65和麒麟990谁强一点?少儿英语哪个好少儿英语哪个好电视直播软件哪个好目前最好的网络电视直播软件是哪个?英语词典哪个好英语词典哪个好核芯显卡与独立显卡哪个好核芯显卡和独立显卡哪个好?请直接点谢谢啦!红茶和绿茶哪个好红茶好还是绿茶好?电动牙刷哪个好飞利浦电动牙刷哪款好?求推荐清理手机垃圾软件哪个好什么手机清理软件最好?云盘哪个好免费的网盘哪个实用?
万网虚拟主机 kdata 建站代码 台湾谷歌地址 微信收钱 hinet idc是什么 免费网页申请 新睿云 华为云盘 上海电信测速 服务器维护 东莞服务器托管 永久免费空间 江苏徐州移动 数据湾 亿库 美国服务器 主机游戏 电脑主机打不开 更多