strings
file analysisLinux/Unix
The strings command is one of the most frequently used commands in Linux/Unix-like operating systems. strings Print the printable character sequences in files
Quick Reference
Command Name:
strings
Category:
file analysis
Platform:
Linux/Unix
Basic Usage:
strings [options] [arguments]
Common Use Cases
Syntax
strings [options] [file...]
Options
Option | Description |
---|---|
-a, --all |
Scan the entire file, not just the data section |
-d, --data |
Only scan the data sections in the file |
-e, --encoding=ENCODING |
Select character encoding: s = single-7bit-byte, S = single-8bit-byte, b = 16-bit bigendian, l = 16-bit littleendian, B = 32-bit bigendian, L = 32-bit littleendian |
-f, --print-file-name |
Print the name of the file before each string |
-n, --bytes=MIN-LEN |
Print sequences of at least MIN-LEN characters (default 4) |
-o |
Same as --radix=o |
-t, --radix=RADIX |
Print the location of the string in base RADIX (d=decimal, o=octal, x=hexadecimal) |
-T, --target=BFDNAME |
Specify the binary file format |
-w, --include-all-whitespace |
Include all whitespace as valid string characters |
-s, --section=NAME |
Only scan the named section |
--help |
Display help information |
--version |
Display version information |
Examples
How to Use These Examples
The examples below show common ways to use the strings
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
strings binary_file