Linux strings-Find printable strings in object files or binary files

Source: Internet
Author: User
Tags printable characters

recommended: More Linux file Lookup and comparison commands attention: Linux commands Daquan

The strings command looks for printable strings in an object file or in a binary file. A string is any sequence of 4 or more printable characters, ending with a newline or null character. The strings command is useful for identifying random object files.

Grammar
File ...]
Options
-A--all: scans the entire file instead of just the target file initialization and loading segment-f–print-file-name: Displays the file name before displaying the string-n–bytes=[number]: finds and outputs all NUL terminator sequences-: Sets the minimum number of characters displayed , the default is 4 characters-T--radix={o,d,x}: The position of the output character, based on octal, decimal or hexadecimal-o: similar to--radix=o-t--target=: Specify binary file Format-e--encoding={s,s,b,l,b,l} : Select character size and sort order: s = 7-bit, S = 8-bit, {b,l} = 16-bit, {b,l} = 32-bit@: Read in option
Instance

List all ASCII text in LS:

Strings/bin/ls

List all ASCII text in LS:

Cat/bin/ls strings

Find the string containing libc in LS, case insensitive:

Grep-i libc

The strings command looks for printable strings in an object file or in a binary file. A string is any sequence of 4 or more printable characters, ending with a newline or null character. The strings command is useful for identifying random object files.

Grammar
File ...]
Options
-A--all: scans the entire file instead of just the target file initialization and loading segment-f–print-file-name: Displays the file name before displaying the string-n–bytes=[number]: finds and outputs all NUL terminator sequences-: Sets the minimum number of characters displayed , the default is 4 characters-T--radix={o,d,x}: The position of the output character, based on octal, decimal or hexadecimal-o: similar to--radix=o-t--target=: Specify binary file Format-e--encoding={s,s,b,l,b,l} : Select character size and sort order: s = 7-bit, S = 8-bit, {b,l} = 16-bit, {b,l} = 32-bit@: Read in option
Instance

List all ASCII text in LS:

Strings/bin/ls

List all ASCII text in LS:

Cat/bin/ls strings

Find the string containing libc in LS, case insensitive:

Grep-i libc

The strings command looks for printable strings in an object file or in a binary file. A string is any sequence of 4 or more printable characters, ending with a newline or null character. The strings command is useful for identifying random object files.

Grammar
File ...]
Options
-A--all: scans the entire file instead of just the target file initialization and loading segment-f–print-file-name: Displays the file name before displaying the string-n–bytes=[number]: finds and outputs all NUL terminator sequences-: Sets the minimum number of characters displayed , the default is 4 characters-T--radix={o,d,x}: The position of the output character, based on octal, decimal or hexadecimal-o: similar to--radix=o-t--target=: Specify binary file Format-e--encoding={s,s,b,l,b,l} : Select character size and sort order: s = 7-bit, S = 8-bit, {b,l} = 16-bit, {b,l} = 32-bit@: Read in option
Instance

List all ASCII text in LS:

Strings/bin/ls

List all ASCII text in LS:

Cat/bin/ls strings

Find the string containing libc in LS, case insensitive:

Grep-i libc

Linux strings-Find printable strings in object files or binary files

Related Article

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.