On 2018-05-28 at 09:08, David wrote: > On 28 May 2018 at 22:47, Richard Owlett <rowlett@cloud85.net> wrote: > >> But that raises another question. >> Why does error message identify a protocol problem after having correctly >> identified the problem as "No such file or directory". > > man rsync says: > "EXIT VALUES > 0 Success > 1 Syntax or usage error > 2 Protocol incompatibility > [etc] > " > > An *exit value* (aka exit status) is an entirely > different concept to an "error number". > > Exit status is partially explained here: > http://mywiki.wooledge.org/BashGuide/TestsAndConditionals?highlight=%28exit%29%7C%28status%29#Exit_Status > > The exit status = 2 mentioned in the man page has nothing > to do with the 2 in the error message > "rsync: change_dir "/media/root/drescued_commo" failed: No such file > or directory (2)" > > The 2 in that message is a reference to errors reported by the standard > library of the C programming language, as explained here: > https://www.ibm.com/developerworks/aix/library/au-errnovariable/index.html For additional reference, when I reproduced the error locally, the exit code (as reported by 'echo $?', run immediately after the rsync command) was 23. The rsync man page documents exit value 23 as being "Partial transfer due to error", which is perfectly consistent with the behavior at hand. (In my case the "partial" transfer consisted of transferring zero files, out of a total of one file requested, but the principle is the same.) -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
Attachment:
signature.asc
Description: OpenPGP digital signature