What should I do if I accidentally delete the executable file or related configuration file?
Source: Internet
Author: User
What should I do if I accidentally delete the executable file or related configuration file? -- Linux general technology-Linux technology and application information. For details, refer to the following section. If you have deleted the configuration file, you must find the backup file to restore it. If there is no backup file, you need to manually modify the configuration file. There is no other way.
If the executable file is deleted by mistake, you can find the same version and copy it back to the original directory. Take RPM systems (such as RedHat, Fedora, and Mandrake) as an example.
First, we will investigate the location of the deleted file, then query which RPM the file was installed by, and finally install the RPM again.
For example, if we accidentally delete the ls (you are not careful !!), First, we need to know that the complete path of ls is/bin/ls under/bin. Next, run the following command to know which RPM the program is installed, as shown below:
[Root @ home root] # rpm-qf/bin/ls
Coreutils-5.2.1-48
Therefore, we can install coreutils again. We can find this RPM on the installation disc or on the official website. Execute the following command to perform the upgrade (or reinstall) operation.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service