LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to convert bin like to text ? (https://www.linuxquestions.org/questions/linux-general-1/how-to-convert-bin-like-to-text-668749/)

frenchn00b 09-09-2008 03:22 PM

how to convert bin like to text ?
 
Hello

I have a file without LR LF, and linux thinks that it is a bin.
How can I format it so that I can cat/read it?

thanks

pixellany 09-09-2008 03:45 PM

It seems that anything other than plain text has some kind of signature at the beginning. Is that not what Linux uses to decide how to read a file?

Try doing "cat filename|hexdump -C|more" to see what's actually there.

jailbait 09-09-2008 03:52 PM

Some text editors will allow you to read a binary file, others won't. I know gedit will not display a binary file. I know that kwrite and mped will display a binary file.

The best editor choice is probably ghex. ghex displays any file both as hexadecimal and ascii and allows you to edit it either as hexadecimal or as ascii.

http://rpmfind.net/linux/RPM/dag/red....dag.i386.html

--------------------
Steve Stites

rob.rice 09-09-2008 10:29 PM

If you just want to read the file goto a terminal and run mc (midnight commander)
navigate to the file highlight it then hit F3

tredegar 09-10-2008 07:38 AM

How about
Code:

strings binfile > readablefile
?

theYinYeti 09-10-2008 08:00 AM

If it is just a DOS text file with CRLF line-endings, this simple command will transform it into a Unix texe file (LF line-endings):

tr -d '\r' </path/to/DosTextFile >/path/to/new/UnixTextFile

Yves.

chrism01 09-10-2008 07:55 PM

Try dos2unix

tredegar 09-11-2008 05:08 AM

Having asked his question, and received 6 useful replies, the OP has left this thread to ask other questions:
http://www.linuxquestions.org/questi...d.php?t=668700
http://www.linuxquestions.org/questi...d.php?t=668746

frenchn00b 09-11-2008 12:30 PM

Quote:

Originally Posted by tredegar (Post 3276901)
Having asked his question, and received 6 useful replies, the OP has left this thread to ask other questions:
http://www.linuxquestions.org/questi...d.php?t=668700
http://www.linuxquestions.org/questi...d.php?t=668746

nonono, didnt come to it yet... I look at it next week. That's WEEKEND ! ;) :) :)


All times are GMT -5. The time now is 01:46 PM.