testdisk作为一个开源工具,主要提供三大工具进行数据的测试和恢复。
源码下载
github地址:https://github.com/cgsecurity/testdisk
下载地址:https://github.com/cgsecurity/testdisk.git
下载命令:git clone https://github.com/cgsecurity/testdisk.git
源码编译
查看安装配置说明文件:INSTALL
运行命令进行自动配置如下:
[yubo.wang@localhost testdisk]$ mkdir config
[yubo.wang@localhost testdisk]$ autoreconf --install -W all -I config
configure.ac:13: installing 'config/config.guess'
configure.ac:13: installing 'config/config.sub'
configure.ac:17: installing 'config/install-sh'
configure.ac:17: installing 'config/missing'
src/Makefile.am:415: warning: <F: non-POSIX variable name
src/Makefile.am:434: warning: '%'-style pattern rules are a GNU make extension
src/Makefile.am: installing 'config/depcomp'
[yubo.wang@localhost testdisk]$
运行compile.sh脚本进行自动编译,打印如下:
[yubo.wang@localhost testdisk]$ ./compile.sh
This script will try to compile e2fsprogs progsreiserfs ntfsprogs libraries
Try to compile TestDisk
make all-recursive
make[1]: Entering directory `/home/yubo.wang/testdisk/testdisk'
Making all in icons
make[2]: Entering directory `/home/yubo.wang/testdisk/testdisk/icons'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/yubo.wang/testdisk/testdisk/icons'
Making all in man
make[2]: Entering directory `/home/yubo.wang/testdisk/testdisk/man'
编译出3个工具可执行文件:fidentify photorec testdisk
[yubo.wang@localhost testdisk]$ file src/fidentify
src/fidentify: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=2546ca7c6416a10873c829996eeb58704f7be9fe, not stripped
[yubo.wang@localhost testdisk]$ file src/testdisk
src/testdisk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4f528e24094ef626af73e52dae08c3fe6dc9d6a8, not stripped
[yubo.wang@localhost testdisk]$ file src/photorec
src/photorec: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0280f9eba7fb89204714998c10ba3aa1b9396c16, not stripped
扩展:使用sudo yum install testdisk自动安装工具效果也是一样的。