Recover files that were mistakenly deleted in Linux

Source: Internet
Author: User

Use the Delete command with caution!

Recovery is because your sector is not covered, this is why copy files so slow and delete files so fast, because the deletion is only the filename, the inode number is still good.


The downloaded EXTUNDELETE-0.2.4.TAR.BZ2 software must first be uploaded to the Linux system and extracted

TAR-JXVF extundelete-0.2.4.tar.bz2


Uninstall the partitions that need to be recovered

Umount/tmp/sdb1


CD to extundelete-0.2.4 directory

Perform source code compilation./configure, usually error, so use RPM to install a bag called e2fsprogs-devel*

Then execute./configure #检查安装环境并生成makefile文件

Execute the Make command #编译 (three axes:./configure, make, make install)

Execute the Make install command #安装





Recovery Method 1: View the deleted file name through the Inode node

Create a directory as a recovery point

EXTUNDELETE/TMP/SDA1--inode 2 #可看到inode号和delete被删除状态

EXTUNDELETE/TMP/SDA1--restore-inode #12是查看到的想恢复文件的节点数


Method 2: Restore by file name

EXTUNDELETE/TMP/SDA1--restore-file a.txt #a. txt is the name of the file you want to recover (similarly, if you want to restore the directory, change file to directory)


EXTUNDELETE/TMP/SDA1--restore-all #一次性恢复全部被删除的文件!





Recover files that were mistakenly deleted in Linux

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.