将已删除的文件恢复到centos(vps)中的特定目录中

问题描述 投票:0回答:1

我不小心删除了/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>

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

linux centos rpm yum
1个回答
0
投票
您可以做的最好的事情是看一台类似的机器(也叫redhat)并看一下文件。如果操作系统和版本相同,则只需复制文件即可。这样,您至少可以重新启用默认存储库并可能重新启用。
© www.soinside.com 2019 - 2024. All rights reserved.