tags:

views:

518

answers:

1

Hi Guys, I would like when we Copy files on to the server via FTP the size of the file changes. What is the reason behind this. Does the change in the file size can make the files corrupt and the FTP process Fails ?

+5  A: 

Most likely, you are copying between Windows and Unix, and the difference in size is due to the difference between CRLF and just LF for line endings.

If it is crucial to preserve the line endings, use BIN (binary) mode to transfer the data. The alternative is ASC (ASCII) mode, where the systems map line endings.

Jonathan Leffler
+1: In addition, I think ASCII mode is free to munge other non-printable characters, such as tab expansion and such.
paxdiablo
RFC939 says that ASCII mode may only be used for transferring data with 0 in the 8th bit -- at least, that's my reading without having tracked down the definition of NVT-ASCII. NVT is Network Virtual Terminal as defined by the Telnet spec (RFC854).
Jonathan Leffler