开发者社区> 问答> 正文

在centos(vps)中的特定目录中还原已删除的文件

我不小心删除了/etc/yum.repos.d目录中的所有文件

yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repolist: 0

yum install svn
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
  Run "yum repolist all" to see the repos you have.
  To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
  To enable custom repositories:
     yum-config-manager --enable <repo>

如何还原特定目录的文件?

展开
收起
祖安文状元 2020-01-16 17:40:06 751 0
1 条回答
写回答
取消 提交回答
    1. 您不能仅凭魔法还原所有文件,我们不知道您拥有哪个存储库。

    您可能要做的最好的事情是查看一台类似的计算机(也称为redhat)并查看文件。如果操作系统和版本相同,则只需复制文件即可。这样,您至少可以重新启用默认存储库,甚至可以重新启用。

    2020-01-16 17:40:11
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
Ghost Telephonist 立即下载