Sample Header Ad - 728x90

rsync the file `a`b

22 votes
3 answers
1797 views
Yeah, I know what you are thinking: "Who on earth names their file
ab
?" But let us assume you *do* have a file called
ab
(possibly made by a crazy Mac user - obviously not by you), and you want to rsync that. The obvious solution: rsync server:'./ab' ./.; rsync 'server:./ab' ./.; 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