linux下的命令学习!strings
2010-10-27 22:30
232 查看
strings 命令
用途
在对象文件或二进制文件中查找可打印的字符串。语法
strings [ -a ] [ - ] [ -o ] [ -t Format ] [ -n Number ] [ -Number ] [ File ... ]描述
strings 命令在对象文件或二进制文件中查找可打印的字符串。字符串是 4 个或更多可打印字符的任意序列,以换行符或空字符结束。 strings 命令对识别随机对象文件很有用。标志
-a 或 - | 搜索整个文件,而不仅仅是数据段,以寻找可打印的字符串。如果省略这个标志,则 strings 命令只在对象文件的初始化数据空间内寻找。 |
-n Number | 指定最小的字符串长度(除了缺省的 4 个字符以外)。字符串长度的最大值是 4096。这个标志与 -Number 标志相同。 |
-o | 列出文件中每个跟随在其八进制偏移量之后的字符串。这个标志与 -t o 标志相同。 |
-t Format | 列出从文件最开始起,每个跟随在其偏移量之后的字符串。该格式取决于用作 Format 变量的字符。 d以十进制写下偏移量。 o以八进制写下偏移量。 x以十六进制写下偏移量。 注:当 -o 和 -t Format 标志在一个命令行上多次定义,则最后指定的标志控制 strings 命令的行为。 |
-Number | 指定最小的字符串长度(除了缺省的 4 个字符以外)。字符串长度的最大值是 4096。这个标志与 -n Number 标志相同。 |
File | 要搜索的二进制文件或对象文件。 |
退出状态
该命令返回以下退出值:0 | 表示命令成功运行。 |
>0 | 表示出错。 |
示例
要搜索文件,请输入:strings strings
strings 命令显示:
@(#)56 1.17 com/cmd/scan/strings.c, cdmscan, bos320 5/7/92 10:21:20 标准输入 strings.cat /usr/mbin/strings Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] %7o %7d %7x %7o %7d
要搜索至少有 12 个字符的字符串,请输入:
strings -12 strings
strings 命令显示:
1.17 com/cmd/scan/strings.c, cdmscan, bos320 5/7/92 10:21:20 标准输入 /usr/mbin/strings Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...]
要搜索至少有 20 个字符的字符串,并以十六进制来显示偏移量,请输入:
strings -t x -n 20 strings
strings 命令显示:
1017 1.17 com/cmd/scan/strings.c, cmdscan, bos320 5/7/92 10:21:20 108c Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] 10d8 Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] 1124 Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] 1170 Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...] 11bc Usage: strings [-a | -] [-o] [-t format] [-n | -#] [file...]
相关文章推荐
- Linux-Shell脚本编程-学习-1-Linux基本命令
- Linux命令学习手册-split命令
- linux 软件安装 yum命令学习
- 快速学会linux的man学习shell命令
- linux命令学习-之echo
- Linux命令学习手册-iostat命令
- Linux学习(六) --- VI编辑器常用命令
- 【2015/9/26】Linux学习日志_Day1 一些终端命令
- Linux学习小记(二)---基本命令
- linux中的strings命令简介
- 点滴学习Linux----cat命令学习
- Linux命令学习积累
- linux命令学习笔记-持续更新版
- Linux常用命令学习总结 - 文件目录管理类命令(2)
- 学习笔记之linux基本命令使用方法
- Linux命令学习手册-netstat命令
- Linux命令学习之二
- Linux由管道组成的值得学习的命令
- Linux初步学习(文件权限的三个命令)
- Linux 的学习命令