当前位置 博文首页 > jasftp使用方法,JaSFtp绿色版下载

    jasftp使用方法,JaSFtp绿色版下载

    作者:kuangmeixiang 时间:2021-07-30 17:17

      在工作中我们经常会遇到这样一种情况,就是需要将文件上传到linux系统或者是将linux系统中的文件取下来,但是很多用户一旦没有ftp、filezilla等这样的图形化工具的时候就会感觉到无从下手。但是,当你掌握了sftp命令的时候,你就会觉得这压根就不是什么难事。#linux专栏#
      这里我们来介绍一下sftp登录及其命令行的用法,希望大家能够掌握它。
    sftp登录
      sftp的登录比较简单,我们只需要执行命令“sftp + ip”即可,比如:sftp 192.168.26.11,执行后需要输入用户名密码进行验证。当然,我们也可以使用命令:sftp user@IP的方式登录指定的用户。
      成功登录sftp进入到sftp的命令行界面,我们可以使用命令help查看sftp命令的帮助信息。
    sftp命令行用法
      为了便于大家快速理解,这里先把sftp命令help后的帮助结果全部贴出来。
      bye finish your SFTP session/结束sftp进程
      cd change your remote working directory/切换目录
      clear clear screen/清屏
      exit finish your SFTP session/退出sftp
      explore explore your local directory/展开本地目录
      get download a file from the server to your local machine/下载服务器文件到本地
      help give help/查看帮助信息
      lcd change and/or print local working directory/切换并显示本地工作路径
      lls list contents of a local directory/显示本地路径
      lpwd print your local working directory/查看本地工作路径
      ls list contents of a remote directory/查看远端路径
      mkdir create a directory on the remote server/创建目录
      mv move or rename a file on the remote server/移动或重命名文件夹
      put upload a file from your local machine to the server/上传文件
      pwd print your remote working directory/打印远程工作路径
      quit finish your SFTP session/结束sftp进程
      rename move or rename a file on the remote server/重命名远端文件名
      rm delete a file/删除文件
      rmdir remove a directory on the remote server/删除远端文件夹
      这里我们需要特别注意,lcd、lls、lpwd都是指对本地机器的相关操作,而其他的命令都是针对远端的服务器。
      常见的用法
      cd 指定远端目录
      lcd 指定本地端目录
      ls 查看当前目录文件
      llls查看本地目录文件
      get xxx.xx下载xxx.xxx文件
      put xxx.xxx 上传xxx.xxx文件
      quit / bye / exit 退出sftp
      这里比如说将本地:“D:\software\达梦数据库类\DM8\企业版” 路径中的RH7.0_DB_DB_v8.1.1.144-Build(2020.11.06-129436)ent.zip放到linux中的/soft/dmsetup中去,执行的命令如下:
      sftp:/root> lcd D:\software\达梦数据库类\DM8\企业版
      Local directory is now D:\software\达梦数据库类\DM8\企业版
      sftp:/root> cd /soft/dmsetup/
      sftp:/soft/dmsetup>
      sftp:/soft/dmsetup> put RH7.0_DB_DB_v8.1.1.144-Build(2020.11.06-129436)ent.zip
      Uploading RH7.0_DB_DB_v8.1.1.144-Build(2020.11.06-129436)ent.zip to remote:/soft/dmsetup/RH7.0_DB_DB_v8.1.1.144-Build(2020.11.06-129436)ent.zip
      sftp: sent 630 MB in 137.84 seconds
      sftp:/soft/dmsetup>