Problem with FTP ascii transfer
I had a problem with the old good ascii/binary FTP transfer modes.
I transferred some files (SQL scripting files, in which carriage returns DO matter) using FTP from a windows system to a linux system using filezilla "auto" mode, that should have resulted in ASCII mode for my sql files. These files are well formed and identical to the originals.
Then, someone else picked these files and moved them to another ftp server.
I finally found that all <CR><LF> couples have been transformed in <CR><CR><LF>.
I guessed that the problem was in the ASCII transfer mode - but, how comes that <CR><LF> => <CR><CR><LF>? I would have rather expected <CR><LF> to become <CR>.
I hope I've been clear, thanks to everyone that will answer!
That sounds odd. A slight tangent, but an alternative is to simply transfer the files in binary mode only -- and then use dos2unix / unix2dos to do the conversion for you.
BUT ... before using this method, make sure there are no intentionally blank lines (e.g. multiple line endings with no intervening text) such as one finds in plain-text documents. For that case, you really do need to specify the exact line ending you are looking for:
Again, this is an example where a cure is much easier than a diagnosis.
Linux/most Unices: \n
|All times are GMT -5. The time now is 07:51 PM.|