fbpx
Wikipedia

strings (Unix)

In computer software, strings is a program in Unix, Plan 9, Inferno, and Unix-like operating systems that finds and prints the strings of printable characters in files. The files can be of regular text files or binary files such as executables. It can be used on object files and core dumps. strings is mainly useful for determining the contents of non-text files.

Overview edit

Strings are recognized by looking for sequences of at least 4 (by default) printable characters terminating in a NUL character (that is, null-terminated strings). Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII and wide character text. By default, it only prints the strings from the initialized and loaded sections of object files; for other types of files, it prints the strings from the whole file. With regular text files, strings and cat give different output. cat outputs the non printable characters but strings does not.

strings is part of the GNU Binary Utilities (binutils), and has been ported to other operating systems including Windows.[1]

Example edit

Using strings to print sequences of characters that are at least 8 characters long (this command prints the system's BIOS information; should be run as root):

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

file.txt edit

a aa aaa aaaa 
strings file.txt # prints aaaa 

See also edit

References edit

External links edit

strings, unix, confused, with, string, computing, computer, software, strings, program, unix, plan, inferno, unix, like, operating, systems, that, finds, prints, strings, printable, characters, files, files, regular, text, files, binary, files, such, executabl. Not to be confused with string computing In computer software strings is a program in Unix Plan 9 Inferno and Unix like operating systems that finds and prints the strings of printable characters in files The files can be of regular text files or binary files such as executables It can be used on object files and core dumps strings is mainly useful for determining the contents of non text files stringsThe strings commandWritten inCOperating systemUnix Unix like Plan 9 InfernoPlatformCross platformTypeCommandLicensePlan 9 MIT License Contents 1 Overview 2 Example 2 1 file txt 3 See also 4 References 5 External linksOverview editStrings are recognized by looking for sequences of at least 4 by default printable characters terminating in a NUL character that is null terminated strings Some implementations provide options for determining what is recognized as a printable character which is useful for finding non ASCII and wide character text By default it only prints the strings from the initialized and loaded sections of object files for other types of files it prints the strings from the whole file With regular text files strings and cat give different output cat outputs the non printable characters but strings does not strings is part of the GNU Binary Utilities binutils and has been ported to other operating systems including Windows 1 Example editUsing strings to print sequences of characters that are at least 8 characters long this command prints the system s BIOS information should be run as root dd if dev mem bs 1k skip 768 count 256 2 gt dev null strings n 8 less file txt edit a aa aaa aaaa strings file txt prints aaaaSee also edit nbsp Free and open source software portalCat Unix Paste Unix GNU Debugger Strip Unix References edit cygwinExternal links edit nbsp The Wikibook Guide to Unix has a page on the topic of Commands strings Shell and Utilities Reference The Single UNIX Specification Version 4 from The Open Group strings 1 Plan 9 Programmer s Manual Volume 1 strings 1 Inferno General commands Manual nbsp This Unix related article is a stub You can help Wikipedia by expanding it vte Retrieved from https en wikipedia org w index php title Strings Unix amp oldid 1189765212, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.