Im wondering how I can convert a binary file to a text file?
What a "binary file" and what a "text file" is is primarily determined by the files contents. So there is no "conversion" between the two, like "convert CSV to Excel format". The latter is just two representations of the same thing - tabular data - but the former are simply different types of contents.
There are (today rather unusual) meanings of "text file" as containing compiled code (calling a relocatible object file before linking "text" was the IBM speak of the seventies) and if you are using the term this way you will have to use a linker. If you are using "text" in the more common meaning of "sequences of characters transporting meaning to a reading human" then there is no (common!) way to transform one into the other.
There are of course programs which use binary representations for text files (simpliest example is a packing program which packs a text file into something binary). In such a case you need to specifically reverse the algorithm (i.e use an unpack-program to restore the text file), but this means to know the used algorithm first. And even this only works if a text file was packed beforehand. Put a binary file in and another binary file will come out, packing or no packing.
If you want to search for text parts inside a binary file, this is possible: use the strings command to list readable strings within otherwise binary files:
I have a text file that is the output of a Netbackup report. The file it generates is just a plain text file with only white space between fields. For example:
Date Policy Type Kilobytes Retention
12/5/2005 WinNT Full 18329948 6 Months
I... (4 Replies)
Hi all,
I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
Hi,
I need to convert a text file formatted like this ("tshark -z conv,ip" output) to HTML:
=====================================================================================================
IPv4 Conversations
Filter:<No Filter>
| <- ... (4 Replies)
In Unix/Ksh, when I try to look inside a file it says that the file may be a binary file and if I want to see it anyway. When i say 'yes', it shows me the content filled with unreadable symbols (looks like binary). Is there a command that I can run from the Unix prompt to convert/translate that... (3 Replies)
Not sure the most effient way to do this.
I have figiured out how to extract columns with shell script, but not sure how to convert
This is what I have...
NEWDNS 04-Jun-2011 06:00:59.762 10.220.136.217 crl.verisign.com
This is what I need.... Change date, remove mil seconds,... (1 Reply)
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Hello guys,
We had to move from a DC to another, and we are now facing an "issue" with some text files.
Looks like that some of our log files are set as binary:
file TuxConnectorURA.20121012
TuxConnectorURA.20121012: data or International Language text
less TuxConnectorURA.20121012... (2 Replies)
Hi All,
I do have a file with many lines (rows) and it is space delimited. For example: I have a file named SR345_pl.txt. If I open it in an editor, it looks like this:
adfr A2 0.9345
dtgr/2 A2 0.876
fgh/3 A2 023.76
fghe/4 A2 2345
bnhy/1 A3 3456
bhy A3 0.9876
phy A5 0.987
kdrt A5... (9 Replies)
Hi All,
I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables.
Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies
LEARN ABOUT DEBIAN
dicar
DICAR(1) General Commands Manual DICAR(1)NAME
dicar - Archive Binary Dictionary
SYNOPSYS
dicar -t bindic1
dicar -x bindic1 [ bindic2 ]
dicar -r bindic1 bindic2
dicar -d bindic1 bindic2
DESCRIPTION
dicar archives binary dictionary bindic1. The hyphen of each option may be omitted.
OPTIONS -t Displays the dictionaries contained in binary dictionary file bindic1. Each displayed name of the dictionaries consists of the text
file name followed by extension '.d'. This text file name is that before the dictionary file is converted into the binary file.
-x Fetches dictionary bindic2 from bindic1. Bindic2 consists of the text file name followed by extension '.d'. This text file name is
that before the dictionary file is converted into the binary file. The fetched file bindic2 becomes a dictionary file in binary
format. If bindic2 is omitted, all dictionaries within bindic1 will be fetched.
-r Adds to bindic1, all dictionaries that are contained in the dictionary file specified in bindic2. Any dictionary in bindic1 that is
contained in bindic1 is overwritten.
-d Deletes bindic2 from bindic1.
EXAMPLES
% ls
chimei.d shima.d
% dicar -t shima.d
(Text dictionary file name = Directory size + Word size, packed)
% dicar r shima.d shima.mwd.d (Replaces shima.mwd.d.)
% dicar r shima.d chimedi.d (Adds chimedi.d to shima.d.)
% dicar -t shma.d
(Text dictionary file name = Directory size + Word size, packed)
SEE ALSO dpbindic(1), mkbindic(1)DICAR(1)