使用scp对于非大型文件(加密的)
本地的target.txt文件拷贝到远程服务机器目录下
scp /Users/local_user/location/target.txt [user_name]@[remote_linux]:/home/location/
远程服务机的source.txt文件拷贝到本地的目录下
scp [user_name]@[remote_linux]:/home/location/source.txt /Users/local_user/location/
拷贝文件夹,加-r参数
(拷贝远程location的一整个文件夹到本地location下,以location为名,即所有文件在location/location/...)
scp -r [user_name]@[remote_linux]:/home/location /Users/local_user/location
使用rsync 同步大型文件
从本地上传文件
从本地上传文件
rsync /Users/deskname/Documents/data/ username@xxxx:/home/username/data/ --progress\
从服务器下载文件
rsync -avzP username@xxxx:/home/username/data/ /Users/deskname/Documents/data/ --progress
同一台服务器,不同账户互传文件
确定登录账户(A传给B)
如果文件在账户A上,那么先登录账户A,在账户A输命令
scp [user A]@[remote_linux]:/home/location/source.txt
[user B]@[remote_linux]:/home/location2/