1 需求
2 语法
Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type]
[-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
file -C [-m magicfiles]
file [--help]
3 示例
- 文件后缀:ELF
- 文件位数:64-bit
- 文件类型:LSB shared object
- CPU架构:x86-64
- 静态链接/动态链接:dynamically linked
- 是否有符号表:not stripped
poc@poc-virtual-machine:~/Documents$ file goahead
goahead: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=6fefe03667ac7700189b60004c0d5384c39689b6, with debug_info, not stripped
poc@poc-virtual-machine:~/Documents$ file libgo.so
libgo.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c0d0994b091f8a5d3bf6e99fabd705e37541d2e4, with debug_info, not stripped
poc@poc-virtual-machine:~/Documents$ file cmd.exe
cmd.exe: PE32+ executable (console) x86-64, for MS Windows
4 参考资料