Strings (Unix)
strings is a shell command that extracts printable character strings from a file which is particular useful for analyzing the content of a binary file.[src] 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.[src] These portions of the binary file can be informative as to what the file contains overall.[src] For a text 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 as cat .[src] The command searches for sequences of printable characters that end with a NUL character but ignores any sequence that is less than a specified length or 4 characters by default.[src] Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII and wide character text.[src] By default, it only selects strings from the initialized and loaded sections of an object file.[src] For other types of files, it selects strings from the whole file.[src] The command is available in Unix, Plan 9, Inferno, and Unix-like systems.[src] It is part of the GNU Binary Utilities ( ), and has been implemented in other operating systems including Windows.[src]
strings is a shell command that extracts printable character strings from a file which is particular useful for analyzing the content of a binary file.[src] 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.[src] These portions of the binary file can be informative as to what the file contains overall.[src] For a text 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 as cat .[src] The command searches for sequences of printable characters that end with a NUL character but ignores any sequence that is less than a specified length or 4 characters by default.[src] Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII and wide character text.[src] By default, it only selects strings from the initialized and loaded sections of an object file.[src] For other types of files, it selects strings from the whole file.[src] The command is available in Unix, Plan 9, Inferno, and Unix-like systems.[src] It is part of the GNU Binary Utilities ( ), and has been implemented in other operating systems including Windows.[src] ==Example== The following command searches the system's BIOS 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== ==References== ==External links==[src]
21 sentences · 21 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Strings (Unix)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/strings-unix. Accessed 30 November 2026.
Chicago
"Strings (Unix)." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/strings-unix.
APA
encyclopegia.org. (2025). Strings (Unix). Retrieved November 30, 2026, from https://encyclopegia.org/wiki/strings-unix
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON