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

    你可能感兴趣的文章
    nginx启动脚本
    查看>>
    Nginx在Windows下载安装启动与配置前后端请求代理
    查看>>
    Nginx多域名,多证书,多服务配置,实用版
    查看>>
    nginx开机启动脚本
    查看>>
    nginx异常:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf
    查看>>
    nginx总结及使用Docker创建nginx教程
    查看>>
    nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
    查看>>
    nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in usrlocalnginxconfnginx.conf128
    查看>>
    nginx日志分割并定期删除
    查看>>
    Nginx日志分析系统---ElasticStack(ELK)工作笔记001
    查看>>
    Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
    查看>>
    nginx最最最详细教程来了
    查看>>
    Nginx服务器---正向代理
    查看>>
    Nginx服务器上安装SSL证书
    查看>>
    Nginx服务器的安装
    查看>>
    Nginx模块 ngx_http_limit_conn_module 限制连接数
    查看>>
    nginx添加模块与https支持
    查看>>
    Nginx用户认证
    查看>>
    Nginx的location匹配规则的关键问题详解
    查看>>
    Nginx的Rewrite正则表达式,匹配非某单词
    查看>>