rsync 的 "lq%n%Lrq" 默认输出格式是什么意思?
What does rsync's "lq%n%Lrq" default output format mean?
关于the documentation,可以通过--out-format
标志来定义rsync的详细输出格式:
--out-format=FORMAT output updates using the specified FORMAT
--out-format=FORMAT This allows you to specify exactly what the rsync client outputs to the user on a per-update basis. The format is a text
string containing embedded single-character escape sequences prefixed
with a percent (%) character. A default format of lq%n%Lrq is assumed
if -v is specified (which reports the name of the file and, if the
item is a link, where it points). For a full list of the possible
escape characters, see the lqlog formatrq setting in the rsyncd.conf
manpage. Specifying the --out-format option will mention each file,
dir, etc. that gets updated in a significant way (a transferred file,
a recreated symlink/device, or a touched directory). In addition, if
the itemize-changes escape (%i) is included in the string (e.g. if the
--itemize-changes option was used), the logging of names increases to mention any item that is changed in any way (as long as the receiving
side is at least 2.6.4). See the --itemize-changes option for a
description of the output of lq%irq.
这意味着 lq%n%Lrq
是默认值。
此外它说lq%irq
在--itemize-changes
部分有解释:
The lq%irq escape has a cryptic output that is 11 letters long. The
general format is like the string YXcstpoguax, where Y is replaced by
the type of update being done, X is replaced by the file-type, and the
other letters represent attributes that may be output if they are
being modified.
好了,现在我和以前一样聪明了^^
lq
是什么意思? %irq
或 YXcstpoguax
是什么意思?
In this answer someone explains %t, %f and %b and I found those "variables" in the rsyncd.conf documentation,但是虽然有一个包含lq
和rq
的例子,但没有解释其含义:
The default log format is lq%o %h [%a] %m (%u) %f %lrq, and a lq%t
[%p] rq
lq
应该是左引号,rq
应该是右引号。
来自 Ubuntu 18.04.5 LTS:
--out-format=FORMAT
This allows you to specify exactly what the rsync client outputs to the user on a per-update basis. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character. A default format of "%n%L" is assumed if either --info=name or -v is specified (this tells you just the name of the file and, if the item is a link, where it points). For a full list of the possible escape characters, see the "log format" setting in the rsyncd.conf manpage.
Specifying the --out-format option implies the --info=name option, which will mention each file, dir, etc. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a touched directory). In addition, if the itemize-changes escape (%i) is included in the string (e.g. if the --itemize-changes option was used), the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least 2.6.4). See the --itemize-changes option for a description of the output of "%i".
Rsync will output the out-format string prior to a file’s transfer unless one of the transfer-statistic escapes is requested, in which case the logging is done at the end of the file’s transfer. When this late logging is in effect and --progress is also specified, rsync will also output the name of the file being transferred prior to its progress information (followed, of course, by the out-format output).
关于the documentation,可以通过--out-format
标志来定义rsync的详细输出格式:
--out-format=FORMAT output updates using the specified FORMAT
--out-format=FORMAT This allows you to specify exactly what the rsync client outputs to the user on a per-update basis. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character. A default format of lq%n%Lrq is assumed if -v is specified (which reports the name of the file and, if the item is a link, where it points). For a full list of the possible escape characters, see the lqlog formatrq setting in the rsyncd.conf manpage. Specifying the --out-format option will mention each file, dir, etc. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a touched directory). In addition, if the itemize-changes escape (%i) is included in the string (e.g. if the --itemize-changes option was used), the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least 2.6.4). See the --itemize-changes option for a description of the output of lq%irq.
这意味着 lq%n%Lrq
是默认值。
此外它说lq%irq
在--itemize-changes
部分有解释:
The lq%irq escape has a cryptic output that is 11 letters long. The general format is like the string YXcstpoguax, where Y is replaced by the type of update being done, X is replaced by the file-type, and the other letters represent attributes that may be output if they are being modified.
好了,现在我和以前一样聪明了^^
lq
是什么意思? %irq
或 YXcstpoguax
是什么意思?
In this answer someone explains %t, %f and %b and I found those "variables" in the rsyncd.conf documentation,但是虽然有一个包含lq
和rq
的例子,但没有解释其含义:
The default log format is lq%o %h [%a] %m (%u) %f %lrq, and a lq%t [%p] rq
lq
应该是左引号,rq
应该是右引号。
来自 Ubuntu 18.04.5 LTS:
--out-format=FORMAT
This allows you to specify exactly what the rsync client outputs to the user on a per-update basis. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character. A default format of "%n%L" is assumed if either --info=name or -v is specified (this tells you just the name of the file and, if the item is a link, where it points). For a full list of the possible escape characters, see the "log format" setting in the rsyncd.conf manpage.
Specifying the --out-format option implies the --info=name option, which will mention each file, dir, etc. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a touched directory). In addition, if the itemize-changes escape (%i) is included in the string (e.g. if the --itemize-changes option was used), the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least 2.6.4). See the --itemize-changes option for a description of the output of "%i".
Rsync will output the out-format string prior to a file’s transfer unless one of the transfer-statistic escapes is requested, in which case the logging is done at the end of the file’s transfer. When this late logging is in effect and --progress is also specified, rsync will also output the name of the file being transferred prior to its progress information (followed, of course, by the out-format output).