[Ilugc] Recovering a binary file

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Fri Mar 21 17:42:07 2008

On 14:33:08 Mar 21, Dhana sekar wrote:

Dear Friends,
    Could you please help me out on this ?

     How to recover the binary file transferred through ASCII Mode ?

     What is the changes while transferring in ASCII Mode and how it can be
reverted back ?


You can do this and recover.

$ tr -d '\r' < file.exe > newfile.exe

under Cygwin on Windows.

Essentially what is done in ASCII mode FTP transfer is map the "\r\n" to
"\n" as Windows terminates newlines with CRLF and UNIX uses only LF.

The best thing to do would be to transfer it in bin mode once again.

When you are doing ASCII transfer of a binary file from Windows to UNIX,
then if the values 0d0a in hex occur nearby, then it will be replaced
with 0a since UNIX uses only newlines.

-Girish


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : 
http://www.ae.iitm.ac.in/pipermail/ilugc/attachments/20080321/c3b3ad9b/attachment.bin

Other related posts: