Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some automated scripts which perform FTP uploads among other things. I'm wondering what level of error checking I should conduct once these uploads have finished executing.

Could anything go wrong uploading a file when it reports "226 Transfer complete" which would warrant extra tests, besides checking for this string in the log, to check if a file was successfully uploaded?

share|improve this question
up vote 2 down vote accepted

No, it does not. 226 can also occur on various conditions where this would not be true (ABORT for one). See RFC 959.

share|improve this answer
Presumably the OP knows he isn't issuing an ABORT command, which to my knowledge, no servers support and no clients issue anyhow. – psusi Mar 28 '12 at 18:13
It is the only command for which 226 does not mean the data has been successfully transferred. – psusi Mar 29 '12 at 14:22

MD5SUM or SHA1SUM may do the trick.

The problem then is that you either have to compute the checksum on the server you're uploading to or download the file from the server and compare. But that could also mean it wasn't downloaded properly...

share|improve this answer

It depends on what you mean by guarantee. 226 means the transfer finished without any error detected, so barring an undetected error corrupting the data, or the server crashing before it can commit it to disk from its cache or something, the files will be identical.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.