Linux Command strings

Source: Internet
Author: User

Linux Command strings

The strings command is used to search for printable strings in an object or binary file. A string is any sequence of four or more printable strings. It ends with a line break or an empty character.

Strings syntax
Strings [options] file_name

Options:
-A/-all: scan the entire file instead of only the initialization and loading segments of the target file.
-F/-print-file-name: displays the file name before the string is displayed.
-N/-bytes = [number]: Find and output a NULL Terminator Sequence
-Num: sets the minimum number of characters displayed (num is a number). The default value is 4 characters.
-T {o, d, x}/-radix = {o, d, x}: Position of the output character, in octal, decimal, or hexadecimal format.
-O: similar to-radix = o
-T/-target =: Specifies the binary file format.
@: Read option from File

Example:

$ gcc hello.c -o hello$ strings hello/lib/ld-linux.so.2__gmon_start__libc.so.6_IO_stdin_usedprintf__libc_start_mainGLIBC_2.0PTRhUWVS[^_];*2$"
$ cat test -f-t d$  strings @test hellohello:     340 /lib/ld-linux.so.2hello:     541 __gmon_start__hello:     556 libc.so.6hello:     566 _IO_stdin_usedhello:     581 printfhello:     588 __libc_start_mainhello:     606 GLIBC_2.0hello:     824 PTRhhello:    1040 UWVShello:    1132 [^_]hello:    1359 ;*2$"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.