commands

strings — extract printable runs

Displays printable runs rather than decoding the entire file. -n sets minimum length. GNU strings can scan different sections depending on build and flags; use -a for all bytes if needed. Nonzero indicates an error. Example assumes a fresh search-transform lab fixture.

Formal Syntax & Structure

linux syntaxlinux
strings [OPTION]... [FILE...]

Parameters & Attributes

NameTypeDescription
-noptionTakes the minimum printable sequence length.
-aoptionscan entire file
FILEoperandInput file(s); omit to read standard input.

Return Value

exit status and output

Displays printable runs rather than decoding the entire file. -n sets minimum length. GNU strings can scan different sections depending on build and flags; use -a for all bytes if needed. Nonzero indicates an error.

Working Example

Example Snippetlinux
strings -a -n 4 sample.bin
Linux Reference