11:04 PM STRINGS : a command in linux to read the non-text files |
|
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.
Format:
strings [-afov] [-min-len]
[-n min-len] [--bytes=min-len] [-t radix] [--radix=radix] [-e encoding] [--encoding=encoding] [-] [--all] [--print-file-name] [--target=bfdname] [--help] [--version] file...
DESCRIPTION
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.
Example:
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.
Format:
Print sequences of characters that are at least min-len characters long, instead of the default 4. |
|
|
Related blogs
You may also like to see:
| [2014-09-21] | [Open System-Linux] |
| | |
| [2014-09-26] | [Open System-Linux] |
Traceroute command in Linux | |
| [2016-12-25] | [Open System-Linux] |
Guide for working with zipped and archived files in Linux/AIX | |
| [2014-03-13] | [Open System-Linux] |
crontab: A command in linux to automatically start/repeat a process at certian time and interval | |
| [2014-10-17] | [Open System-Linux] |
| | |
| Total comments: 0 | |
Traceroute command in Linux
Guide for working with zipped and archived files in Linux/AIX
crontab: A command in linux to automatically start/repeat a process at certian time and interval