如何将本地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
中午的时候有网友联系提到自己前几天看到Namecheap商家开学季促销活动期间有域名促销活动的,于是就信注册NC账户注册域名的。但是今天登录居然无法登录,这个问题比较困恼是不是商家跑路等问题。Namecheap商家跑路的可能性不大,前几天我还在他们家转移域名的。这里简单的记录我帮助他解决如何重新登录Namecheap商家的问题。1、检查邮件让他检查邮件是不是有官方的邮件提示。比如我们新注册账户是需...
欧路云(oulucloud) 商家在前面的文章中也有陆续介绍过几次,这不今天有看到商家新增加美国Cera线路的VPS主机,而且有提供全场八折优惠。按照最低套餐最低配置的折扣,月付VPS主机低至22元,还是比较便宜的。不过我们需要注意的是,欧路云是一家2021年新成立的国人主机商,据说是由深圳和香港的几名大佬创建。如果我们有介意新商家的话,选择的时候谨慎且月付即可,注意数据备份。商家目前主营高防VP...
企鹅小屋:垃圾服务商有跑路风险!企鹅不允许你二次工单的,二次提交工单直接关服务器,再严重就封号,意思是你提交工单要小心,别因为提交工单被干了账号!前段时间,就有站长说企鹅小屋要跑路了,站长不太相信,本站平台已经为企鹅小屋推荐了几千元的业绩,CPS返利达182.67CNY。然后,站长通过企鹅小屋后台申请提现,提现申请至今已经有20几天,企鹅小屋也没有转账。然后,搞笑的一幕出现了:平台账号登录不上提示...