Yeah, I know what you are thinking: "Who on earth names their file
a
b
?"
But let us assume you *do* have a file called a
b
(possibly made by a crazy Mac user - obviously not by you), and you want to rsync
that. The obvious solution:
rsync server:'./a
b' ./.;
rsync 'server:./a
b' ./.;
gives:
~~~~
bash: line 1: a: command not found
rsync: [sender] link_stat "/home/tange/b" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [Receiver=3.2.7]
rsync: [Receiver] write error: Broken pipe (32)
~~~~
Even:
~~~~lang-shellsession
$ rsync 'server:./\a\
b' ./.;
bash: line 3: a\: command not found
rsync: [sender] link_stat "/home/tange/\b" failed: No such file or directory (2)
:
~~~~
What is the rsync
command I *should* be running?
~~~~lang-shellsession
$ rsync --version
rsync version 3.2.7 protocol version 31
~~~~
Asked by Ole Tange
(37348 rep)
Mar 21, 2023, 10:10 PM
Last activity: Mar 24, 2023, 02:56 PM
Last activity: Mar 24, 2023, 02:56 PM