Louis-David Mitterrand
2009-Feb-01 12:39 UTC
strange behaviour on file with ':' in its name
Using 3.0.5 I can't send a file with ':' in its name in the current directory without prefixing it with ./ delos% touch file:ext delos% rsync -avP file:ext sylla:/home/ldm The source and destination cannot both be remote. rsync error: syntax or usage error (code 1) at main.c(1154) [receiver=3.0.5] delos:~% rsync -avP "file:ext" sylla:/home/ldm The source and destination cannot both be remote. rsync error: syntax or usage error (code 1) at main.c(1154) [receiver=3.0.5] delos:~% rsync -avP file\:ext sylla:/home/ldm The source and destination cannot both be remote. rsync error: syntax or usage error (code 1) at main.c(1154) [receiver=3.0.5] delos:~% rsync -avP ./file:ext sylla:/home/ldm sending incremental file list file:ext 0 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/1) sent 83 bytes received 31 bytes 228.00 bytes/sec total size is 0 speedup is 0.00 delos:~% touch file.ext delos:~% rsync -aP file.ext sylla:/home/ldm sending incremental file list file.ext 0 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/1) sent 83 bytes received 31 bytes 76.00 bytes/sec total size is 0 speedup is 0.00
On Sun, 2009-02-01 at 13:33 +0100, Louis-David Mitterrand wrote:> Using 3.0.5 I can't send a file with ':' in its name in the current > directory without prefixing it with ./ > > delos% touch file:ext > > delos% rsync -avP file:ext sylla:/home/ldm > The source and destination cannot both be remote. > rsync error: syntax or usage error (code 1) at main.c(1154) [receiver=3.0.5]That's because the HOST:PATH syntax indicates a source or destination to be accessed via remote shell. If you want to send a file whose name would be misinterpreted as remote, use ./ or --files-from. -- Matt