How to use the strings command in Linux
This article mainly introduces how to use the strings command in Linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.
The Linux common command strings command looks for printable strings in object files or binaries. A string is any sequence of four or more printable characters, ending with a newline or null character. The strings command is useful for identifying random object files.
Strings looks for printable strings in object files or binaries
Syntax strings [- a] [- o] [- t Format] [- n Number] [- Number] [file...] option-a-- all: scan the entire file instead of just the target file initialization and load segment-f-print-file-name: display the file name-n-bytes= [number] before displaying the string: find and output all NUL Terminator sequence -: sets the minimum number of characters displayed The default is 4 characters-t-- radix= {other dline x}: the position of the output character, based on octal Decimal or hexadecimal-o: similar-- radix=o-T-- target=: specify the binary file format-e-- encoding= {sdaget breco brecy l}: select the character size and order: s = 7-bit, S = 8-bit, {bjingerl} = 16-bit, {BPerry L} = 32-bit @: read the option example to list all the ASCII text in the ls:
Strings / bin/ls lists all ASCII text in ls:
Cat / bin/ls strings looks for strings that contain libc in ls, case-insensitive:
Strings / bin/ls | grep-I libc Thank you for reading this article carefully. I hope the article "how to use strings commands in Linux" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!