mac上如何通过一条命令把本地的一个目录下的所有文件上传到服务器的某个目录


前端代码,
就是一些静态文件,
现在想通过一条命令直接部署,
应该怎么做?

前端 mac 网站部署 代码部署 服务器

一般死宅牛叉 10 years, 8 months ago

使用scp就行,语法如下scp local_file remote_username@remote_ip:remote_folder ,例如这样:scp -r mylocaldir [email protected]:/Users/user/dir,这个过程要你输入远程服务器的登陆密码

Di.Mon answered 10 years, 8 months ago

...一条只有 scp 了

git 要3条

FTP的话 ...

艾尔曼陀斯 answered 10 years, 8 months ago

rsync -av 是个很好的选择

和平行者PW answered 10 years, 8 months ago

加上 -r (指recursively)的flag: scp -r [localdir] [user@host:remotedir]。

金仴靈金仴靈 answered 10 years, 8 months ago

rsync 也是不错的选择。

卷心菜小王子 answered 10 years, 8 months ago

Your Answer