Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

strings (Unix)

From Wikipedia, the free encyclopedia
Shell command for extracting printable text from a binary file
Not to be confused withstring (computing).
icon
This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources.
Find sources: "Strings" Unix – news ·newspapers ·books ·scholar ·JSTOR
(April 2024)
strings
Thestrings command
Written inC
Operating systemUnix,Unix-like,Plan 9,Inferno
PlatformCross-platform
TypeCommand
LicensePlan 9:MIT License

strings is ashell command that extractsprintable characterstrings from afile – which is particular useful for analyzing the content of abinary file. By definition, a binary file contains data that is not printable text yet a binary file often does contain some printable character text – often in relatively short sequences distributed throughout the file. These portions of the binary file can be informative as to what the file contains overall. For atext file, a file containing all printable characters, the command prints the entire file content, and therefore, provides no utility over more commonly used file output commands such ascat.

The command searches for sequences of printable characters that end with aNUL character but ignores any sequence that is less than a specified length or 4 characters by default. Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII andwide character text. By default, it only selects strings from the initialized and loaded sections of an object file. For other types of files, it selects strings from the whole file.

The command is available inUnix,Plan 9,Inferno, andUnix-like systems. It is part of theGNU Binary Utilities (binutils), and has been implemented in other operating systems includingWindows.[1]

Example

[edit]

The following command searches the system'sBIOS for strings that are at least 8 characters long:

dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8

See also

[edit]

References

[edit]
  1. ^cygwin

External links

[edit]
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
File system
Processes
User environment
Text processing
Shell builtins
Networking
Searching
Software development
Miscellaneous


Stub icon

ThisUnix-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Strings_(Unix)&oldid=1319736183"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp