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
| Name | Type | Description |
|---|---|---|
| -n | option | Takes the minimum printable sequence length. |
| -a | option | scan entire file |
| FILE | operand | Input 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