系统相关
首页 > 系统相关> > Linux Remote Upload & Download

Linux Remote Upload & Download

作者:互联网

download a file from the server

scp username@servername:/path/filename /var/www/local_dir

scp root@192.168.5.14:/root/bigfish6.jpg /                            ⏎
root@192.168.5.14's password:
/bigfish6.jpg: Read-only file system  // didn't work cause i don't have write right

upload a local file to the server

scp /path/filename username@servername:/path

scp /Users/nedrain/Desktop/bigfish6.jpg root@192.168.5.15:/root/    

// you can see
┌─[root@mycentos]─[~]
└──╼ $ls
anaconda-ks.cfg  bigfish6.jpg

download a directory from the server

scp -r username@servername:/var/www/remote_dir/ /var/www/local_dir

scp -r root@192.168.5.14:/root/  /Users/nedrain/test/

upload a directory to the server

scp -r local_dir username@servername:remote_dir

scp -r /Users/nedrain/test/ root@192.168.5.14:/root/

标签:Remote,servername,Upload,192.168,bigfish6,Download,root,scp,dir
来源: https://www.cnblogs.com/nedrain/p/13161215.html