Name

strings — stdin  stdout  - file  -- opt  --help  --version

Synopsis

strings [options] [files]

Binary files, such as executable programs and object files, usually contain some readable text. The strings program extracts that text and displays it on standard output. You can discover version information, authors’ names, and other useful tidbits with strings.

$ strings /usr/bin/who
David MacKenzie
Copyright %s %d Free Software Foundation, Inc.
Report %s bugs to %s
...

Combine strings and grep to make your exploring more efficient. Here we look for email addresses:

$ strings /usr/bin/who | grep '@'
bug-coreutils@gnu.org

Useful options

-n length

Display only strings with length greater than length (the default is 4).

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.