Как вывести размеры файлов в удобочитаемом формате в лог-файл rsync

1734
3cheesewheel

Я знаю, что эта -hопция выводит размеры файлов в удобочитаемом формате, например, при отображении прогресса передачи --progress.

Но возможно ли получить такое же форматирование файла в файлах журнала? Я вижу параметры / экранирование для отображения количества передаваемых байтов ( %b), а также общего размера файла ( %l), но не вижу способа вывести больше понятных для человека эквивалентов для этих значений.

1

1 ответ на вопрос

2
eram

Found this here rsyncd.conf -- configuration file for rsync in daemon mode ...

 log format This parameter allows you to specify the format used for logging file transfers when transfer logging is enabled. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character. An optional numeric field width may also be specified between the percent and the escape letter (e.g. "%-50n %8l %07p"). In addition, one or more apostrophes may be specified prior to a numerical escape to indicate that the numerical value should be made more human-readable. The 3 supported levels are the same as for the --human-readable command-line option, though the default is for human- readability to be off. Each added apostrophe increases the level (e.g. "%''l %'b %f"). 

Похожие вопросы