Ftp

A very common FTP problem is that If you transfer txt files from unix/linux to a windows box, the file size will change, unless you use binary mode instead of ascii.

Unix text file end each line with a line feed character.
DOS/Windows text files end each line with a carriage return and line feed.
Because of this, there is one additional character in a DOS/Windows file for each line in the file. Your file contains 13421 - 13292 = 129 lines.
When you transfer the file from Unix to DOS using ascii mode in ftp, this conversion takes place automatically. If you use binary mode, no conversion takes place.

Programs like lftp automatically switch to binary for file transfers.

Connect to a FTPS server

These are a couple of scripts I wrote to communicate two FTP servers that had to exchange files constantly.
The scripts use lftp, as ftps client, and always recheck transfer codes and file size before deleting on any of the sides.
They are not the fastest as transfers are serial, but I guess they are pretty safe, which is what I was looking for.

Auto Upload/Download files from a remote FTP

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License