STRINGS(1)
π STRINGS(1) β or, "how to read the ghostly little text crumbs hiding inside your files"
ok so bestie, welcome to strings, a genuinely iconic little tool from the GNU Development Tools squad. she's not flashy, she's not loud, but she is literally the main character of "what is even inside this binary". let's get into it π
β¨ NAME β¨
strings β print the sequences of printable characters in files π¦
πΈ SYNOPSIS πΈ
strings [-afovV] [-min-len]
[-n min-len] [--bytes=min-len]
[-t radix] [--radix=radix]
[-e encoding] [--encoding=encoding]
[-U method] [--unicode=method]
[-] [--all] [--print-file-name]
[-T bfdname] [--target=bfdname]
[-w] [--include-all-whitespace]
[-s] [--output-separator sep_string]
[--help] [--version] file...
she takes a whole bunch of file... arguments and honestly she eats every time π
π DESCRIPTION π
okay so picture this: for each file you hand her, GNU strings prints out the printable character sequences that are at least 4 characters long (or whatever minimum length you set with the options down below, no pressure) and that are followed by an unprintable character. that's the whole bit. that's the vibe. β¨
now here's the fun part β depending on how the strings program was configured, she'll default to either:
- showing you all the printable sequences she can find in each file, or
- showing you only those sequences that live in loadable, initialized data sections.
if the file type is unrecognizable, or if strings is reading from stdin, then she will always display all of the printable sequences that she can find. no gatekeeping π«Ά
also, for backwards compatibility, any file that occurs after a command-line option of just - will also be scanned in full, regardless of the presence of any -d option. historic behaviour, we respect her π
lowkey the whole point: strings is mainly useful for determining the contents of non-text files. she's the friend who reads the group chat screenshots for you π
π₯ OPTIONS π₯
-a,--all,-β scan the whole file, regardless of what sections it contains or whether those sections are loaded or initialized. normally this is the default behaviour, butstringscan be configured so that the-dis the default instead.
and listen β the - option is position dependent, and it forces strings to perform full scans of any file that is mentioned after the - on the command line, even if the -d option has been specified. so yes, order matters, she's dramatic like that π
-d,--dataβ only print strings from initialized, loaded data sections in the file. this may reduce the amount of garbage in the output, but it also exposes thestringsprogram to any security flaws that may be present in the BFD library used to scan and load sections. πstringscan be configured so that this option is the default behaviour. in such cases the-aoption can be used to avoid using the BFD library and instead just print all of the strings found in the file.
ngl, that's a real security caveat, not a vibe β read it twice π¨
-f,--print-file-nameβ print the name of the file before each string. king behaviour, honestly, saves you from wondering which file a string came from π--helpβ print a summary of the program usage on the standard output and exit. she's helpful AND she exits, a queen β¨-min-len,-nmin-len,--bytes=min-len β print sequences of displayable characters that are at least min-len characters long. if not specified, a default minimum length of 4 is used. the distinction between displayable and non-displayable characters depends upon the setting of the-eand-Uoptions. sequences are always terminated at control characters such as new-line and carriage-return, but not the tab character. rude of tab to survive but ok π-oβ like-t o. some other versions ofstringshave-oact like-t dinstead. since we can not be compatible with both ways, we simply chose one. we picked a side, and we're at peace with it π-tradix,--radix=radix β print the offset within the file before each string. the single character argument specifies the radix of the offset βofor octal,xfor hexadecimal, ordfor decimal. so many numbers, so little time π-eencoding,--encoding=encoding β select the character encoding of the strings that are to be found. possible values for encoding are:s= single-7-bit-byte characters (default)S= single-8-bit-byte charactersb= 16-bit bigendianl= 16-bit littleendianB= 32-bit bigendianL= 32-bit littleendian
useful for finding wide character strings. (l and b apply to, for example, Unicode UTF-16/UCS-2 encodings). so many letters, all lowercase and uppercase, she's an alphabet lesson fr fr π§
-U[d|i|l|e|x|h],--unicode=[default|invalid|locale|escape|hex|highlight]β controls the display of UTF-8 encoded multibyte characters in strings.
the default (--unicode=default) is to give them no special treatment, and instead rely upon the setting of the --encoding option. the other values for this option automatically enable --encoding=S. β¨
--unicode=invalidtreats them as non-graphic characters and hence not part of a valid string. π- all the remaining options treat them as valid string characters.
--unicode=localedisplays them in the current locale, which may or may not support UTF-8 encoding.--unicode=hexdisplays them as hex byte sequences enclosed between<>characters.--unicode=escapedisplays them as escape sequences (\uxxxx).--unicode=highlightdisplays them as escape sequences highlighted in red (if supported by the output device). the colouring is intended to draw attention to the presence of unicode sequences where they might not be expected. π π΄
-Tbfdname,--target=bfdname β specify an object code format other than your system's default format. you're the format, bestie, choose your own π¦-v,-V,--versionβ print the program version number on the standard output and exit.-w,--include-all-whitespaceβ by default tab and space characters are included in the strings that are displayed, but other whitespace characters, such as newlines and carriage returns, are not. the-woption changes this so that all whitespace characters are considered to be part of a string. inclusivity icon π-s,--output-separatorβ by default, output strings are delimited by a new-line. this option allows you to supply any string to be used as the output record separator. useful with--include-all-whitespacewhere strings may contain new-lines internally. (the synopsis calls it[-s] [--output-separator sep_string]β fancy separator upgrade, no cap) π@file β read command-line options from file. the options read are inserted in place of the original@file option. if file does not exist, or cannot be read, then the option will be treated literally, and not removed. π
options in file are separated by whitespace. a whitespace character may be included in an option by surrounding the entire option in either single or double quotes. any character (including a backslash) may be included by prefixing the character to be included with a backslash. the file may itself contain additional @file options; any such options will be processed recursively. it's giving inception, it's giving turtles all the way down π’
π¦ SEE ALSO π¦
go give these siblings some love: ar(1), nm(1), objdump(1), ranlib(1), readelf(1) and the Info entries for binutils. whole family of icons πΈ
π COPYRIGHT π
Copyright (c) 1991-2026 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
<div align="center">β©β§βΛ and that's the whole page, bestie Λββ§β©</div>
this little masterpiece is from binutils-2.47, dated 2026-07-30 β she's STRINGS(1) and she devoured, periodt π
β¨π«Ά
π¦ where this page comes from
- arch rolling: avr-binutils 2.47-1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms