Article 4PZE6 using rsync with files/folders using embedded blanks in names

using rsync with files/folders using embedded blanks in names

by
SaintDanBert
from LinuxQuestions.org on (#4PZE6)
How do I use rsync to read and write when the file and folder names use embedded blanks?

DISCLAIMER -- This issues is typographically awkward. I'll try my best but please bear with me.

I have a flock of external drives, SD cards, and thumb drives that were written using embedded blanks in file and folder names. I'm tasked to consolidate these files and folders onto a linux file server. A simple copy using:
Code:prompt$ cp -av "some\ Source" "some\ Target"One issue,
(or similar) does not seem to be good enough.

One tangle comes from the "volume name" or "volume label" that typically results in a mount point like
/media/username/some sort of string with blanks

Now when you add folder and file names you quickly run out of allowed characters on a command line in scripts or internal to utilities like rsync.

While running, rsync reports "I/O error writing..." for some blank-embedded files. It succeeds with others. The failing files can be moved manually using:
Code:prompt$ cp -av "source/a file/that uses blanks" "target/a file/keeping blanks"Thanks in advance,
~~~ 0;-Danlatest?d=yIl2AUoC8zA latest?i=Rq9KoHiu6KM:ovKWqqiXZPU:F7zBnMy latest?i=Rq9KoHiu6KM:ovKWqqiXZPU:V_sGLiP latest?d=qj6IDK7rITs latest?i=Rq9KoHiu6KM:ovKWqqiXZPU:gIN9vFwRq9KoHiu6KM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments