Find printable strings in files (POSIX)
strings [-O format] [-a] [-n number] [file...]
To print in: | Specify: |
---|---|
octal | o |
hex | x |
decimal | d |
The strings utility looks for printable strings in regular files and writes those strings to standard output, one per line. A printable string is any sequence of number or more printable characters followed by a newline or NUL character.
For the file /.boot, output all printable strings equal to or longer than four characters and prefix each line with the octal offset from the beginning of the file:
strings /.boot
Output all printable strings equal to or longer than 10 characters and prefix the line with the hex offset from the beginning of the file:
strings -Ox -n10 /.boot