I have a plain text file with a list of paths (about 120 of them, one per each line) that I need to rsync into a single directory, for this, I'm using this suggestion:
rsync -av `cat /path/to/file` /destination/
The issue is that the paths contain spaces that are escaped with \ so they look like this:
/path/to\ some/directory-001/
/path/to\ some/directory-003/
...
/path/to\ some/directory-120/
When I run the command above I get:
rsync: link_stat "/path/to" failed: No such file or directory (2)
rsync: link_stat "/path/to/some/directory-001/" failed: No such file or directory (2)
It works perfectly if there are no spaces in the paths. I tried wrapping the paths in double quotes, single quotes, remove the \ with or without quotes.
Please let me know if there is a way around this, I may be missing something on the actual command?
Thanks!