分类 Linux运维 下的文章

一、功能

在主机和主机之间进行文件传输,可以把远程服务器的文件到本地,也可以把本机的文件复制到远程服务器。

二、用法

scp [文件] [用户]@[域名或IP地址]:[路径]

常用选项

  • -a 复制文件的同时也复制状态和权限
  • -f 如果目标位置存在该文件,先删除再复制
  • -r 复制目录
  • -P 指定端口

- 阅读剩余部分 -

把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

- 阅读剩余部分 -