mac上传文件到服务端的方法

1.使用命令行

将本地文件传到104.224.166.36的服务器

 scp -P 27988 /Users/hill/Desktop/start.sh [email protected]:/root

-P表示端口号 大写 27988表示服务器的端口号,一般不填写表示默认的端口号22

/Users/hill/Desktop/start.sh 表示本地文件

[email protected]:/root表示远程文件目录

登录服务器查看 文件已经上传

如果要上传目录 用-r

 scp -P 27988 -r /Users/hill/Desktop/new  [email protected]:/root

登录服务器 表示文件已上传

下载服务器文件到本地

scp -P 27988 [email protected]:/root/hi.txt  /Users/hill/Desktop/hhh

服务器文件目录[email protected]:/root/hi.txt

本地文件目录/Users/hill/Desktop/hhh

2.方法2 使用beyound compare工具,这个工具对比代码非常方便

3.使用filezilla上传 只有配置好即可

打开filezilla

猜你喜欢

转载自blog.csdn.net/resilient/article/details/85334594