Upload files to a Windows FTP server from the Linux command line. Then in another Windows client login to the FTP server download, but the downloaded file size changed, EXE file error is not executed correctly. Intentionally packaged files (. rar) also prompt for file corruption.
This situation has occurred several times.
Discovery: There are two modes of mode character mode (ASCII) and binary mode (binary) for uploading files to an FTP server via Linux. The default is ASCII mode. Generally upload EXE files and compressed packets to be used in binary mode.
Specific operation:
After you log in to FTP, before uploading the file, enter the bin in the ftp> state.
And then you can put/root/desktop/test.rar/test.rar it.
Note that all two paths are paths with filenames, so there is the ability to rename them while uploading.
After uploading, you can check with LS.
Resolution of file corruption caused by uploading via FTP put command