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

RAKsmart:美国洛杉矶独服,E3处理器/16G/1TB,$76.77/月;美国/香港/日本/韩国站群服务器,自带5+253个IPv4

RAKsmart怎么样?RAKsmart机房即日起开始针对洛杉矶机房的独立服务器进行特别促销活动:低至$76.77/月,最低100Mbps带宽,最高10Gbps带宽,优化线路,不限制流量,具体包括有:常规服务器、站群服务器、10G大带宽服务器、整机机柜托管。活动截止6月30日结束。RAKsmart,美国华人老牌机房,专注于圣何塞服务器,有VPS、独立服务器等。支持PayPal、支付宝付款。点击直达...

火数云-618限时活动,国内云服务器大连3折,限量50台,九江7折 限量30台!

官方网站:点击访问火数云活动官网活动方案:CPU内存硬盘带宽流量架构IP机房价格购买地址4核4G50G 高效云盘20Mbps独享不限openstack1个九江287元/月立即抢购4核8G50G 高效云盘20Mbps独享不限openstack1个九江329元/月立即抢购2核2G50G 高效云盘5Mbps独享不限openstack1个大连15.9元/月立即抢购2核4G50G 高效云盘5Mbps独享不限...

提速啦(900元/月),杭州BGP E5-2665/89*2 32核 48G 100G防御

提速啦的来历提速啦是 网站 本着“良心 便宜 稳定”的初衷 为小白用户避免被坑提速啦的市场定位提速啦主要代理市场稳定速度的云服务器产品,避免新手购买云服务器的时候众多商家不知道如何选择,妮妮云就帮你选择好了产品,无需承担购买风险,不用担心出现被跑路 被诈骗的情况。提速啦的售后保证提速啦退款 通过于合作商的友好协商,云服务器提供3天内全额退款,超过3天不退款 物理机部分支持当天全额退款提速啦提现 充...

sftp为你推荐
桌面背景图片桌面背景和桌面壁纸的区别是什么?唐人社美国10次啦急!我和我老公都是第一次.我们有十次左右性生活;为什么我每次都没什么感觉;也没高潮(他有高潮)而且感觉好像没进去;怎么办?免费送q币活动那些免费送Q币的活动是不是假的啊???小说软件哪个好用免费现在看小说用什么软件好,不用钱的,英语词典哪个好什么英语词典好?核芯显卡与独立显卡哪个好英特尔核芯显卡怎么样?和独立显卡那个更好?51空间登录51咋登录 咋登录好友的51空间qq空间登录不上qq空间登不进去 怎么办飞信空间登录请问如何登陆我的飞信空间?东莞电信网上营业厅电信网上营业厅广东电信
西安服务器租用 vps代理 荣耀欧洲 ix主机 国外服务器网站 20g硬盘 网页背景图片 免费ftp站点 免费网站申请 免费mysql 电子邮件服务器 免费全能主机 免费dns解析 东莞服务器 万网主机管理 免费外链相册 智能dns解析 免费asp空间申请 金主 ssl加速 更多