CentOS6.5恢复误删除的文件
2016-06-12 10:11
821 查看
系统环境:CentOS release 6.5 (Final)
内核版本:2.6.32-431.el6.x86_64
需要的源码包:extundelete-0.2.4.tar.bz2
解压bz2包:
# tar -jxvf extundelete-0.2.4.tar.bz2
cd extundelete-0.2.4
./configure
报错:
configure: error: C++ compiler cannot create executables
解决办法:
# yum install gcc gcc-c++ gcc-g77 –y
将gcc组件安装完整
./configure
报错:
configure: error: Can't find ext2fs library
解决办法:
# yum -y install e2fsprogs-devel
# ./configure
Configuring extundelete 0.2.4
Writing generated files to disk
出现上面消息说明安装成功:将生成的文件写入磁盘
1、通过inode节点恢复
扫描/dev/sdb1
# extundelete /dev/sdb1 --inode 2
恢复文件
# extundelete /dev/sdb1 --restore-inode 14
2、通过文件名恢复
# extundelete /dev/sdb1 --restore-file zhangsan
3、恢复某个目录
# extundelete /dev/sdb1 --restore-directory nimei
4、恢复所有文件
# extundelete /dev/sdb1 --restore-all
以上恢复方法只针对非空的文件,RHEL7的xfs是可以将空文件恢复
内核版本:2.6.32-431.el6.x86_64
需要的源码包:extundelete-0.2.4.tar.bz2
解压bz2包:
# tar -jxvf extundelete-0.2.4.tar.bz2
cd extundelete-0.2.4
./configure
报错:
configure: error: C++ compiler cannot create executables
解决办法:
# yum install gcc gcc-c++ gcc-g77 –y
将gcc组件安装完整
./configure
报错:
configure: error: Can't find ext2fs library
解决办法:
# yum -y install e2fsprogs-devel
# ./configure
Configuring extundelete 0.2.4
Writing generated files to disk
出现上面消息说明安装成功:将生成的文件写入磁盘
1、通过inode节点恢复
扫描/dev/sdb1
# extundelete /dev/sdb1 --inode 2
恢复文件
# extundelete /dev/sdb1 --restore-inode 14
2、通过文件名恢复
# extundelete /dev/sdb1 --restore-file zhangsan
3、恢复某个目录
# extundelete /dev/sdb1 --restore-directory nimei
4、恢复所有文件
# extundelete /dev/sdb1 --restore-all
以上恢复方法只针对非空的文件,RHEL7的xfs是可以将空文件恢复
相关文章推荐
- Linux parted命令格式化2T以上硬盘脚本
- centos7 开机启动某些程序的方法
- Linux用extundelete恢复误删文件
- 使用谷歌身份验证器增强SSH安全
- Linux下中文文件名乱码问题的详解
- linux系统下怎么安装.deb文件?
- ssh:Network error:connection refused的排查
- linux权限管理_ACL权限
- linux iminor imajor dev_t
- linux下umask的使用讲解
- TFTP在linux上使用
- lenky的个人站点 ----LINUX 内核进程
- Linux线程-互斥锁pthread_mutex_t
- Linux字符设备驱动
- 每天一个Linux命令(45)lsof命令
- Linux中的文件类型
- LINUX命令随记
- linux file search
- 欢迎使用CSDN-markdown编辑器
- Linux服务器集群LVS