sftp的使用-本地与远程服务器之间的文件传输
如何将本地pc上的文件通过sftp上传到linux服务器如何将linux服务器上的文件下载到本地pc上SecureCRT 工具:打开会话窗口设置服务器设置本地PC的目录这个地址用于将该目录下的文件进行上传到linux服务器或把linux上的文件下载到该目录下打开sftp窗口(或者使用Alt+P快捷键打开sftp窗口)在sftp窗口执行命令help,查看sftp可使用的命令sftp> helpAvailable commands:ascii Set transfer mode to ASCII (设置文件传输模式为ascii)binary Set transfer mode to binary(设置文件传输模式为二进制)cd pathChange remote directory to 'path' (这个就不用说了吧~ )detail remote-pathDisplay system information about remote file or folder(查看远程服务器上的文件夹详细信息咯)例子sftp> detail ~/huqin /home/mmap/huqin: Type: Directory Size: 280 uid/gid: 500/500 uid/gid: 500/500 Last Modification Time: October 16, 2014 10:35:28 Last Access Time : October 16, 2014 10:36:18 Permissions: drwxrwxr-xsftp>ldetail local-pathDisplay system information about local file or folder(查看本地pc上的文件夹详细信息咯)例子:C:/Users/Administrator/Desktop/snak: Type: Directory Size: 4096 Create Time : October 14, 2014 14:31:54 Last Modification Time: October 16, 2014 10:35:48 Last Access Time : October 16, 2014 10:35:48 File Attributes: no-attributes Link Count: 1sftp>lcd path Change local directory to 'path'(专用于改变本地目录用的喽) 例子:sftp> lpwdC:/Users/Administrator/Desktop/snak #当前本地目录sftp> lcd E:\Work #改变本地目录为E:\Worksftp> lpwd #当前本地目录E:/Worksftp>chgrp group pathChange group of file 'path' to 'group' (改变path所属的组喽)chmod mode pathChange permissions of file 'path' to 'mode' (这个也不用说了吧 改变权限w/r/x之类的了)chown owner pathChange owner of file 'path' to 'owner'(改变档案的拥有者咯)exit Quit sftphelp Display this help textinclude filename Include commands from 'filename' Alternate: < filenameget [-a | -b] remote-path Download file force ascii (-a) or binary (-b) mode例子将我的linux服务器的~/testDir下的文件下载到本地pc上sftp> pwd /home/mmapsftp> cd ~/testDirsftp> pwd/home/mmap/testDirsftp> lpwdC:/Users/Administrator/Desktop/snaksftp> llscontral.txt worm.txtsftp> get -a testFile #-a :以ascii方式下载 -b:以二进制方式下载Downloading testFile from /home/mmap/testDir/testFile 100% 283 bytes 283 bytes/s 00:00:00/home/mmap/testDir/testFil