GNU/Linux Command – STRINGS

strings – Print the strings of printable characters in files.
 
Summary:
For each file given, strings prints the printable character sequences that are at least 4 characters long and are followed by an unprintable character. Strings is mainly useful for determining the contents of non-text files.
 
Example:
$ strings /bin/ls -- Prints the strings from initialized and loaded sections.  $ strings -a file -- Scan the whole file for the strings.  $ strings -f /bin/* | grep Free -- Show filename before each string.  $ strings -t o file -- Print the offset within the file before each string [o = Octal, x = Hex, d = Decimal].  $ strings -n 10 file -- Print sequences of characters that are at least 10 characters long (Default 4).  $ strings word.doc -- Try it and try with xls file also.
NOTE: Write a simple “Hello World” program in C and try this command on the binary file of that program.
 
Read: man strings

Advertisements
Tagged with: ,
Posted in Uncategorized

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: