Winunix

Linux和windows之间远程复制

scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令 Windows与linux间的文件复制方法

1在windows下文件上传到Linux上

scp E:\Scp_file\backup-platform.zip root@192.168.1.6:/opt/

2linux之间的远程复制文件

1:登录到远程

ssh mouren@188.188.188.188

2:从远程服务器复制到本地

从远程复制到当前目录

scp mouren@188.188.188.188:/home/mouren/ardu.txt .

scp -r mouren@188.188.188.188:/home/mouren/ardu /home/gl

使用apache服务

把文件放到/var/www/html下 使用IP来访问就可以下载到windows上了

3:将本地的上传到远程服务器

1
2
scp xxx  mouren@188.188.188.188:/home/nouren
scp -r   xxx  mouren@188.188.188.188:/home/nouren

Rsync的使用

1
2
3

rsync -a /opt/media/ remote_user@remote_host_or_ip:/opt/media/        从本地到远程
rsync -a remote_user@remote_host_or_ip:/opt/media/ /opt/media/       	远程到本地
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Load Days...Load HMS...
Built with Hugo