需要安装的依赖包:

1. e2fsprogs软件包已安装
2. e2fsprogs-libs软件包已安装
3. e2fsprogs-devel软件包已安装
4. gcc软件包已安装
5. gcc-c++ 软件包已安装
6.下载extundelete
http://nchc.dl.sourceforge.net/project/extundelet
e/extundelete/0.2.4/extundelete-0.2.4.tar.bz2

yum install -y gcc gcc-c++ e2fsprogs e2fsprogs-devel  e2fsprogs-libs

#编译安装:

cd extundelete-0.2.4/

./configure

make && make install

#验证是否安装成功
extundelete -v

#切换到需要恢复的上层目录,查看文件节点:

ls -i

#检测到”delete”标记所删除的文件

extundelete /dev/sda2 --inode 2

#被删文件会恢复到当前目录下的RECOVERED_FILES目录中去
extundelete --restore-file a.txt /dev/sdb1
或#
extundetele --restore-inode i



/
dev/sdb1
# 查看恢复文件
# cd RECOVERED_FILES/
# ls -l

查看帮助:

extundelete --help

Usage: extundelete [options] [--] device-file
Options:
--version, -[vV] Print version and exit successfully.
--help, Print this help and exit successfully.
--superblock Print contents of superblock in addition to the rest.
If no action is specified then this option is implied.
--journal Show content of journal.
--after dtime Only process entries deleted on or after 'dtime'.
--before dtime Only process entries deleted before 'dtime'.
Actions:
--inode ino Show info on inode 'ino'.
--block blk Show info on block 'blk'.
--restore-inode ino[,ino,...]
Restore the file(s) with known inode number 'ino'.
The restored files are created in ./RECOVERED_FILES
with their inode number as extension (ie, file.12345).
--restore-file 'path' Will restore file 'path'. 'path' is relative to root
of the partition and does not start with a '/'
The restored file is created in the current
directory as 'RECOVERED_FILES/path'.
--restore-files 'path' Will restore files which are listed in the file 'path'.
Each filename should be in the same format as an option
to --restore-file, and there should be one per line.
--restore-directory 'path'
Will restore directory 'path'. 'path' is relative to the
root directory of the file system. The restored
directory is created in the output directory as 'path'.
--restore-all Attempts to restore everything.
-j journal Reads an external journal from the named file.
-b blocknumber Uses the backup superblock at blocknumber when opening
the file system.
-B blocksize Uses blocksize as the block size when opening the file
system. The number should be the number of bytes.
--log 0 Make the program silent.
--log filename Logs all messages to filename.
--log D1=0,D2=filename Custom control of log messages with comma-separated
Examples below: list of options. Dn must be one of info, warn, or
--log info,error error. Omission of the '=name' results in messages
--log warn=0 with the specified level to be logged to the console.
--log error=filename If the parameter is '=0', logging for the specified
level will be turned off. If the parameter is
'=filename', messages with that level will be written
to filename.
-o directory Save the recovered files to the named directory.
The restored files are created in a directory
named 'RECOVERED_FILES/' by default.

最新文章

  1. Smart3D系列教程4之 《案例实战演练1——小物件的照片三维重建》
  2. 连接 insance 到 vlan101 - 每天5分钟玩转 OpenStack(97)
  3. CheckListBox的实现方式分析
  4. iOS开发之通知使用总结
  5. 用标准C编写COM(一)
  6. js 原型的内存分析
  7. hibernate学习之Hibernate API
  8. css学习知识点
  9. 学习Java之前操作环境的安装及配置
  10. 二识angularJS
  11. Spring学习之路一
  12. 夏令营讲课内容整理Day 1.
  13. JavaWeb(一)Servlet
  14. Error occurred in deployment step 'Retract Solution': xxx 无法反序列化,因为它没有公共的默认构造函数
  15. 用Python实现数据结构之栈
  16. 分布式监控系统Zabbix3.4-针对MongoDB性能监控操作笔记
  17. hdoj:2035
  18. mybatis_动态sql 查询、更新
  19. springboot-29-security(二)用户角色权限控制
  20. Elasticsearch在windows上安装好了之后怎么使用?

热门文章

  1. 关于简单的安卓APP状态栏设置(类似沉浸式状态栏)
  2. 【算法】【python实现】二叉树深度、广度优先遍历
  3. [Linux]权限s权限和t权限
  4. Groovy闭包
  5. P4735 最大异或和
  6. 1、在Centos上安装Grafana
  7. windows无法安装msi文件
  8. Python学习(三十七)—— 模板语言之自定义filter和中间件
  9. Linux awk学习
  10. vue笔记-生命周期