Solve the Problem of accidentally deleting files on Linux servers
Source: Internet
Author: User
Solve the Problem of accidentally deleting files on a Linux system server-Linux Enterprise Application-Linux server application information. The following is a detailed description. The server accidentally deleted the/usr/bin and/usr/sbin directories, and copied these two directories from other places. Many of them may be non-common files such as links, when the link can be copied, I do not know what parameters should be added to the link processing. Therefore, more than one hundred MB of data is copied to nearly one G. Finally, I gave tar a copy and copied it.
In this way, the server is basically ready. We recommend that you:
1. Do not log on directly with root, especially unfamiliar users.
2. We recommend that you use sudo to execute the root command and use less su;
3. Use mongodo to configure the root permission command to be executed.
Eg: xxx ALL =/sbin/mount,/sbin/unmount,/sbin/ifconfig NOPASSWD: ALL
The rm command does not work. However, there are "sequelae ":
1. during login, 'linux ': unknown terminal type;
2. When top, clear (known) is used, it is caused by the terminal type problem;
3. vim is also a similar problem and cannot be operated; it has been resolved, but it can only be used in the basic mode;
4. the tftp and telnet services have been resolved.
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.