知乎专栏 | 多维度架构 |
打印文件中的可打印字符的字符串。
二进制文件中有很多文本信息,比如打印信息、调试信息、帮助信息、错误等。只要这些信息都存在于二进制文件中,就可以用 strings 命令将其转储到屏幕上。
[root@localhost ~]# strings /bin/ls | grep "list" %s: not listing already-listed directory -A, --almost-all do not list implied . and .. -B, --ignore-backups do not list implied entries ending with ~ -C list entries by columns -d, --directory list directories themselves, not their contents -g like -l, but do not list owner -G, --no-group in a long listing, don't print group names follow symbolic links listed on the command line --hide=PATTERN do not list implied entries matching shell PATTERN -I, --ignore=PATTERN do not list implied entries matching shell PATTERN -l use a long listing format -m fill width with a comma separated list of entries -n, --numeric-uid-gid like -l, but list numeric user and group IDs -o like -l, but do not list group information -R, --recursive list subdirectories recursively -U do not sort; list entries in directory order -x list entries by lines instead of by columns -1 list one file per line. Avoid '\n' with -q or -b