Home » 2014 » March » 11 » STRINGS : a command in linux to read the non-text files

10:04 PM
STRINGS : a command in linux to read the non-text files

Share on Google+

Suppose you opened a file (eg. a binary file) in linux which is completely un-readable. There might be some useful words that you want to see. You can go for strings command.

  • strings : Mainly useful for determining the contents of non-text files.
 strings [-afov] [-min-len]
               [-n min-len] [--bytes=min-len]
               [-t radix] [--radix=radix]
               [-e encoding] [--encoding=encoding]
               [-] [--all] [--print-file-name]
               [--help] [--version] file...


       For  each  file  given, GNU strings prints the printable character sequences that are at least 4 characters long (or the  number given with the options below) and are followed by an unprintable character.   By  default,  it  only  prints  the strings  from  the initialized and loaded sections of object files; for other types of files, it prints the strings from the whole file.


 1.   strings non-text-file
    The above command will show all the words of the file having at least  character.
    We can manually specify the no. of words i.e. minimum length of characters of words to be shown from the non-text file. See below example:
2. strings -n 2 non-text-file
    Above command will find all the words from non-readable file with minimum two characters.
strings -n min-len filename 

Print sequences of characters that are at least min-len characters long, instead of the default 4.


Category: Open System-Linux | Views: 1594 | Added by: shanky | Tags: command to read a non-readablefile, strrings, how to see a non-readable file in l | Rating: 0.0/0

Related blogs

You may also like to see:

[2015-01-18][Open System-Linux]
The JAR archiving tool in Linux
[2014-01-08][Open System-Linux]
SSH Login Setup
[2015-06-01][Open System-Linux]
DIG command : A DNS lookup utility
[2014-04-10][Open System-Linux]
SED command for filtering and transforming texts of a file using regular expression
[2016-04-14][Open System-Linux]
AT command in Linux : schedule a task at later time

Total comments: 0