The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-30-2008
Lakris Lakris is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 246
Just a comment,
I think it's a bad habit of most ftp-implementations to default to converting data between systems, ie ASCII transfer. I would rather always transfer the data in binary, exactly, or at least as closely as possible, as it is represented on "the other" system, and make the conversion myself. I know what it looks like on one system and and I know how I want it on another. It is better to control it Yourself than letting someone else (the ftp-client) to convert it the way it thinks it should be, because that may differ between clients and methods.
I think You will find that binary mode transfers don't add or change anything in Your data. It is ASCII-mode that usually converts line breaks, character sets between platforms, etc.

Then again, ASCII may be the way You want it or expect it...

file is a command to check the type of file, it may not always be completely accurate. The FTP-definition of binary is not shared by all...

and as jim pointed out, running it through dos2unix, shouldn't hurt, as long as it's "text" data, it could actually wreak havoc in some data files, such as xml CDATA, or sql with "binary" BLOBS.

/Lakris