博客
关于我
Mac本地与远程Linux服务器之间的文件上传与下载
阅读量:138 次
发布时间:2019-02-27

本文共 770 字,大约阅读时间需要 2 分钟。

如何通过Mac终端上传或下载文件到服务器

在Mac终端中使用SCP命令可以方便地将文件或文件夹上传到服务器,或者从服务器下载到本地。以下是操作指南:

  • 上传文件到服务器
  • 在Mac终端中,使用以下命令可以将文件或文件夹上传到服务器:

    scp /path/to/local/file user@server:./remote/path
    • /path/to/local/file:本地文件的路径
    • user@server:服务器的用户名和地址(例如:face@192.168.65.213)
    • ./remote/path:服务器上的目标路径

    如果需要上传文件夹,请在命令后添加 -r 参数:

    scp -r /path/to/local/directory user@server:./remote/directory

    在执行命令之前,请确保本地文件路径正确,且服务器端路径已经准备好。

    1. 下载文件到本地
    2. 如果需要从服务器下载文件或文件夹到本地,可以使用以下命令:

      scp user@server:/path/to/remote/file /path/to/local/directory
      • user@server:服务器的用户名和地址
      • /path/to/remote/file:服务器上的文件路径
      • /path/to/local/directory:本地保存的路径

      如果需要下载多个文件,可以将多个文件路径用空格分隔:

      scp user@server:/path/to/file1 /path/to/file2 /path/to/file3 /path/to/local/directory

      请注意,以上命令仅适用于SCP命令。如果需要其他传输工具,请参考相关文档。

      通过以上方法,您可以轻松地在Mac终端中上传或下载文件和文件夹到服务器,完成文件的管理任务。

    转载地址:http://skdd.baihongyu.com/

    你可能感兴趣的文章
    org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not s
    查看>>
    sqlserver学习笔记(三)—— 为数据库添加新的用户
    查看>>
    org.apache.http.conn.HttpHostConnectException: Connection to refused
    查看>>
    org.apache.ibatis.binding.BindingException: Invalid bound statement错误一例
    查看>>
    org.apache.ibatis.exceptions.PersistenceException:
    查看>>
    org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
    查看>>
    org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
    查看>>
    org.apache.poi.hssf.util.Region
    查看>>
    org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
    查看>>
    org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
    查看>>
    org.hibernate.HibernateException: Unable to get the default Bean Validation factory
    查看>>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
    查看>>
    org.springframework.boot:spring boot maven plugin丢失---SpringCloud Alibaba_若依微服务框架改造_--工作笔记012
    查看>>
    SQL-CLR 类型映射 (LINQ to SQL)
    查看>>
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    查看>>
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    查看>>
    org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
    查看>>
    org.tinygroup.serviceprocessor-服务处理器
    查看>>
    org/eclipse/jetty/server/Connector : Unsupported major.minor version 52.0
    查看>>
    org/hibernate/validator/internal/engine
    查看>>