博客
关于我
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/

    你可能感兴趣的文章
    Prometheus 云原生 - 微服务监控报警系统 (Promethus、Grafana、Node_Exporter)部署、简单使用
    查看>>
    Prometheus 云原生 - 监控 Linux、MySQL、Redis、RabbitMQ、Docker、SpringBoot 3.x
    查看>>
    Prometheus 介绍
    查看>>
    Prometheus 安全配置详解
    查看>>
    prometheus 安装node_exporter, node_exporter 安装最新版 普罗米修思安装监控服务器client
    查看>>
    Prometheus 安装部署实战
    查看>>
    prometheus 持久化存储方案
    查看>>
    Prometheus 监控系统企业级实战
    查看>>
    Prometheus 监控系统简介
    查看>>
    Prometheus 配置详解
    查看>>
    Prometheus 采集器使用详解
    查看>>
    Prometheus 黑盒监控实战
    查看>>
    prometheus+alertmanager+grafana监控部署教程
    查看>>
    Prometheus+Grafana构建智能化Kubernetes监控系统实战
    查看>>
    Prometheus+SpringBoot应用监控全过程详解
    查看>>
    Prometheus+SpringBoot应用监控全过程详解
    查看>>
    prometheus安装
    查看>>
    Prometheus实战教程:监控Kafka消息
    查看>>
    Prometheus实战教程:监控mysql数据库
    查看>>
    Prometheus实战教程:监控Nginx状态
    查看>>