Lesser known linux commands : strings

strings: This command will bring out strings of printable characters from a file.

e.g On a simple helloworld programme, compiled in gcc  it gives following result

$ strings a.out
hello world

strings is useful to know the type of file. It helps us in guessing the contents.
Sometimes, due to file corruption regular applications may not open some files. If
data is important we can try strings to get atleast printable things out. Also
if we have an executable about which we don’t know anything (including help), then
running strings will give us some clue. In the above case – hello world – will help
us to guess the nature of executable.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: