Linux mistakenly deleted files after recovery

Source: Internet
Author: User

In order to reduce the loss to a minimum, Linux mistakenly deletes the file to do the following:

One: Unmount or mount the partition that needs to be resumed in a read-only manner;

EXAMPLE:UMOUNT/DEV/SDB1 #卸载挂载的sdb1

Two: Install Extundelete (need Epel source for support)

Example:yum-y Install Extundelete

Three: View the inode for the file in the SDB1 partition

EXAMPLE:EXTUNDELETE/DEV/SDB1--inode 2

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/79/EB/wKioL1ad_Fbh6E97AAAoX1EsIIs824.png "title=" QQ picture 20160119170323.png "alt=" Wkiol1ad_fbh6e97aaaox1esiis824.png "/>

File name Inode Deltete


Four: Recover files

Example:mkdir/home/test #在另外分区新建一个目录

Cd/home/test

EXTUNDELETE/DEV/SDB1--restore-inode #恢复inode to 12 of the documents;

EXTUNDELETE/DEV/SDB1--restore-file 1.txt #恢复文件名为1. txt file;

EXTUNDELETE/DEV/SDB1--restore-directory etc #恢复文件夹etc

This article is from the "night Reading Wit Hope female Ghost" blog, please be sure to keep this source http://more3.blog.51cto.com/9929586/1736558

Linux mistakenly deleted files after recovery

Related Article

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.