One misuse of the Linux RM

Source: Internet
Author: User

Today, under Linux misuse of a rm-rf, experience painful, record.

The reason is I deleted a file to the Recycle Bin, then the wrong thing to delete everything under the home to the Recycle Bin, and then I copied from the Recycle Bin back home directory instead of using recovery, because things in the home directory is a bit more impatient to give up, and then see only half copy, Directly under the terminal RM-RF *,ORC orc orc

Recovery process

  • Because the system is just installed, the home directory only a few things, so directly with the flash drive to the mirror to start the machine, and then the U disk/home/mint under the contents of the copy to my own home directory;
  • Restart the system to find the desktop or can not start, looked at the copy of the desktop directory does not have write permission, plus chmod 755/home/xxx/desktop;
  • The owner of these directories has been changed, sudo chown-r xxx:yyy *, because the root permission was used to copy the Desktop directory.

Lesson

  • Important files are well backed up, such as various configuration files;
  • The permissions of each file should be added correctly, try not to use chmod 777 this way of adding permissions;
  • Careful use of RM-RF *;

One misuse of the Linux RM

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.