STRINGS(1)
๐ STRINGS(1) ๐
okay bestie, pull up a chair, because we're about to talk about strings from the GNU Development Tools lineup and honestly? she's that girl. ๐
โจ 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...
โจ DESCRIPTION โจ
so for every file you hand over, GNU strings prints out the printable character sequences that are at least 4 characters long (or however many you said with the options down below, bestie) and that are followed by an unprintable character. periodt. ๐
depending on how the strings program was configured, it'll default to either:
- showing you all the printable sequences it can find in each file, or
- only the sequences that live in loadable, initialized data sections.
but listen โ if the file type is unrecognizable, or if strings is reading from stdin, then it's always gonna show you all of the printable sequences it can find. no cap. ๐ค
for backwards compatibility, any file that shows up after a command-line option of just - also gets scanned in full, regardless of whether a -d option is hanging around. ๐
and lowkey, the whole point: strings is mainly useful for figuring out the contents of non-text files. iykyk ๐ง
โจ OPTIONS โจ
-a,--all,-โ scan the whole file, no matter what sections it contains or whether those sections are loaded or initialized. normally this is the default behaviour, butstringscan be configured so that-dis the default instead. ๐
the - option is position dependent and forces strings to do full scans of any file mentioned after the - on the command line, even if the -d option was specified. she does not care. she's doing it anyway. ๐
-d,--dataโ only print strings from initialized, loaded data sections in the file. this can cut down the garbage in your output, but it also exposes thestringsprogram to any security flaws that might be lurking in the BFD library used to scan and load sections. โ ๏ธstringscan be configured so this option is the default behaviour โ in those cases you use-ato avoid the BFD library entirely and just print all the strings found in the file.-f,--print-file-nameโ print the name of the file before each string. cute little label energy. ๐ท๏ธ--helpโ print a summary of the program usage on the standard output and exit. bye bestie ๐-min-len,-n min-len,--bytes=min-lenโ print sequences of displayable characters that are at least min-len characters long. if you don't specify anything, the default minimum length is4. the whole "displayable vs non-displayable" distinction depends on what you set for the-eand-Uoptions. also, sequences are always terminated at control characters like new-line and carriage-return โ but not the tab character. tabs stay. tabs are valid. ๐ซถ-oโ same as-t o. some other versions ofstringshave-oact like-t dinstead, but since we literally cannot be compatible with both ways, we just chose one. we said what we said. ๐-t radix,--radix=radixโ print the offset within the file before each string. the single character argument tells you the radix of that offset:ofor octal,xfor hexadecimal, ordfor decimal. pick your fighter. ๐ข-e encoding,--encoding=encodingโ pick the character encoding of the strings you want 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
super useful for finding wide character strings. (l and b apply to, like, Unicode UTF-16/UCS-2 encodings, for example.) โจ
-U [d|i|l|e|x|h],--unicode=[default|invalid|locale|escape|hex|highlight]โ controls how UTF-8 encoded multibyte characters get displayed in strings. the default (--unicode=default) gives them no special treatment and just relies on whatever you set for--encoding. every other value for this option automatically enables--encoding=S. slay.--unicode=invalidtreats them as non-graphic characters, so they're 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 the output device supports it). the colouring is meant to draw attention to unicode sequences where you might not expect them. main character behaviour honestly. ๐
-T bfdname,--target=bfdnameโ specify an object code format other than your system's default format. ๐ธ-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 get displayed, but other whitespace characters (like newlines and carriage returns) are not.-wchanges all that so that every whitespace character counts as part of a string. ๐-s,--output-separatorโ by default, output strings are delimited by a new-line. this option lets you supply any string to be used as the output record separator. super useful with--include-all-whitespace, where strings may contain new-lines internally. ๐@fileโ read command-line options from file. the options that get read are inserted in place of the original@fileoption. if file doesn't exist, or can't be read, then the option is treated literally and not removed. ๐คท
options inside file are separated by whitespace. a whitespace character can be included in an option by surrounding the entire option in either single or double quotes. any character (including a backslash) can be included by prefixing the character you want with a backslash. and the file can itself contain additional @file options โ any such options get processed recursively. ๐
โจ SEE ALSO โจ
ar(1), nm(1), objdump(1), ranlib(1), readelf(1) and the Info entries for binutils. go read your siblings, bestie, they're all iconic. ๐
โจ 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, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
and that's the whole thing, babe ๐ this page came from binutils-2.47, dated 2026-08-11, and it's the STRINGS(1) manual. go print some strings. you got this. ๐ซถโจ
๐ฆ where this page comes from
- arch rolling: binutils 2.47-4 ยท GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND GFDL-1.3 AND FSFAP
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms