Monday, January 15, 2007

Do Unto Others...

I've heard smug critics of the Golden Rule say that better formula would have been, "Do unto others as they would have you do unto them", providing as their test case a masochist. You would not want a masochist doing to you as the masochist would have you do to them.

Such criticism seemed overtly clever and cynical to me to ever take seriously. Still a pithy response felt appropriate, for those who still suffered from the illusion that this was a reasonable argument against the wisdom of Jesus.

A response did not occur to me till recently (after hearing about Russian psychologists who discovered that corporal punishment helped end depression - and some wag commented that they must have been masochist inmates). Basically, it follows the pattern that extreme or 'edge' cases do not make good law, or that a hypothesis is not required to incorporate outlying data (explain, yes -- incorporte, no), or that a reasonable explanation of an event need not respect the ideas or opinions of the insane...

It is simply that, moral codes need not respect the motivations of the mentally ill.

Sunday, January 22, 2006

Odd behavior of rsync on Mac OS X

Today, I was trying to type an rsync command that would copy all my iPhotos from one computer to another. Since the final directory in the path contains a space character ("iPhoto Library"), I included it in single quotes, like this (username and computer are not the actual values I used :-)

rsync -avz username@computer.local:/Users/Shared/Pictures/'iPhoto Library/' /Users/Shared/Pictures/'iPhoto Library/'

After pressing Enter and entering my password, rsync gave the error:

receiving file list ... rsync: link_stat "/Users/Shared/Pictures/iPhoto" failed: No such file or directory (2)

Clearly, the single quotes weren't doing the job. So I replaced single with double-quotes. Still no luck. After googling space chars in directory names, and learning about the backslash, I tried 'iPhoto\ Library/'. This kinda worked: Rsync found the right source directory, but on the destination machine it created a directory named iPhoto\ Library. But at least the results suggested a solution. I changed the destination directory to 'iPhoto Library/', so the entire command looked assymetrically like this:

rsync -avz username@computer.local:/Users/Shared/Pictures/'iPhoto\ Library/' /Users/Shared/Pictures/'iPhoto Library/'

Eureka! It works. My only problem is I don't know why the specification of the source directory needs both single-quotes and a backslash to represent a space character, but the destination directory needs only single-quotes and a space?

-Xot