Python:修订间差异
来自康健生活
| 第19行: | 第19行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
alias python='/usr/bin/python3.4'</syntaxhighlight> | alias python='/usr/bin/python3.4'</syntaxhighlight> | ||
== 删除 == | |||
{| class="wikitable" | |||
|+ 删除python包 | |||
|- | |||
| 查看当前系统安装的python包 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python</syntaxhighlight>}} | |||
|- | |||
| 强制删除系统安装程序python包及其相关 || {{shc|<syntaxhighlight lang="bash"> | |||
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps</syntaxhighlight>}} | |||
|- | |||
| 删除所有残余文件 ##xargs,允许你对输出执行其他某些命令 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python |xargs rm -frv</syntaxhighlight>}} | |||
|- | |||
| 验证删除,返回无结果 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis python</syntaxhighlight>}} | |||
|} | |||
{| class="wikitable" | |||
|+ 删除现有yum | |||
|- | |||
| 示例 || {{shc|<syntaxhighlight lang="bash"> | |||
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps</syntaxhighlight>}} | |||
|- | |||
| 示例 || {{shc|<syntaxhighlight lang="bash"> | |||
whereis yum |xargs rm -frv</syntaxhighlight>}} | |||
|- | |||
| 下载相应的rpm包(centos6版本) || {{shc|<syntaxhighlight lang="bash"> | |||
http://mirrors.ustc.edu.cn/centos/6/os/x86_64/Packages/</syntaxhighlight>}} | |||
|} | |||
== 功能 == | == 功能 == | ||