Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   rsync    ( 1 )

быстрый, универсальный, удаленный (и локальный) инструмент для копирования файлов (a fast, versatile, remote (and local) file-copying tool)

Расширенное использование (Advanced usage)

The syntax for requesting multiple files from a remote host is done by specifying additional remote-host args in the same style as the first, or with the hostname omitted. For instance, all these work:

rsync -av host:file1 :file2 host:file{3,4} /dest/ rsync -av host::modname/file{1,2} host::modname/file3 /dest/ rsync -av host::modname/file1 ::modname/file{3,4}

Older versions of rsync required using quoted spaces in the SRC, like these examples:

rsync -av host:'dir1/file1 dir2/file2' /dest rsync host::'modname/dir1/file1 modname/dir2/file2' /dest

This word-splitting still works (by default) in the latest rsync, but is not as easy to use as the first method.

If you need to transfer a filename that contains whitespace, you can either specify the --protect-args (-s) option, or you'll need to escape the whitespace in a way that the remote shell will understand. For instance:

rsync -av host:'file\ name\ with\ spaces' /dest