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
The plan for a gaming-themed Atari hotel in Las Vegas has reportedly been
scrapped
-
Six years after the announcement of plans to build Atari Hotels in eight
cities across the US, including Las Vegas, only one now seems to be moving
forwa...
11 hours ago