Linux sometimes executes the RM-RF and other operations mistakenly deleted the file is absolutely a terrible thing, fortunately there are some solutions to temporary emergency. We are going to use a tool called Extundelete. Catalog [-] Rely on install find to recover drive name run Recovery restore single file restore a directory recover an entire partition Linux executing RM is not actually deleted, but instead the sector in the Inode node is deleted and the data block is freed. This part of the data can still be found before the data block is reassigned to the system. Online said that after deleting the file to immediately unmount this partition, this is actually to let the outside world no longer write, we can also be set to ReadOnly mode instead. Of course, if you want to not affect the operation of other applications, you can not do unmount. OK, now it's time for the artifact Extundelete to play. Take CentOS6.5 as an example of dependency1Yum-y Install e2fsprogs e2fsprogs-libs e2fsprogs-devel Installation1wget http://jaist.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz22Tar jxvf extundelete-0.2.4. tar.bz23CD extundelte-0.2.44./Configure5make install to find the drive name to restore1DF2 3Filesystem 1k-blocks used Available use%mounted on4/dev/sda1495844 64150 406094 -% /Boot run restore restores a single file by default to the Recovered_files directory in the current directory1EXTUNDELETE/DEV/SDB1--restore-file hosts recover a directory1EXTUNDELETE/DEV/SDB1--restore-files test/recovering an entire partition1extundelete/dev/sdb1–-restore-All This tool seems to support the EXT4 file system, after the actual test, restore-all is relatively easy to use, after the initial deletion can be very good to restore the file and directory structure, but if I created the same location in the same file name or directory name, it will fail to recover (not found). The recovery of a separate file or directory is not successful, if there is a successful can tell me.
CentOS Rm-rf Recover deleted files