Linux下scp命令的使用方法
一、功能
在主机和主机之间进行文件传输,可以把远程服务器的文件到本地,也可以把本机的文件复制到远程服务器。
二、用法
scp [文件] [用户]@[域名或IP地址]:[路径]
常用选项
- -a 复制文件的同时也复制状态和权限
- -f 如果目标位置存在该文件,先删除再复制
- -r 复制目录
- -P 指定端口
在主机和主机之间进行文件传输,可以把远程服务器的文件到本地,也可以把本机的文件复制到远程服务器。
scp [文件] [用户]@[域名或IP地址]:[路径]
常用选项
https://github.com/git/git/releases,目前最新版2.15
:
wget https://github.com/git/git/archive/v2.15.0.tar.gz
网速慢的话可以搞个代理,或者用迅雷下载。
把CentOS6.5默认的python2.6升级到了python2.7,然后运行yum命令的时候就出现了错误:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It"s possible that the above module doesn"t match the
current version of Python, which is:
2.7.13 (default, Aug 18 2017, 21:52:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
CentOS6.5自带python环境为2.6,公司的python环境为2.7.
为了避免出现以后代码出现版本差异,所以把自带的2 .6版本升级到了2.7,过程十分曲折。。。。
中途遇到的问题和解决方法请点击:Python安装时遇到的问题