Папка Rsync, в то время как - исключают-from'ing .gitignore файлы на различных глубинах

Это выполнилось три раза, однажды для каждого файла соответствия. В странице справочника существует подсказка:

sharedscripts
       Normally,  prerotate  and postrotate scripts are run for each log which is rotated and the absolute path
       to the log file is passed as first argument to the script. That means a single script may be run  multi-
       ple  times  for  log  file  entries which match multiple files (such as the /var/log/news/* example). If
       sharedscripts is specified, the scripts are only run once, no matter how many logs match the  wildcarded
       pattern,  and  whole  pattern  is  passed  to them.  However, if none of the logs in the pattern require
       rotating, the scripts will not be run at all. If the scripts exit with error, the remaining actions will
       not  be  executed  for  any  logs.  This  option overrides the nosharedscripts option and implies create
       option.

Но конечно, Вы только находите это, после того как Вы знаете для взгляда там. (Кроме того, я экспериментально проверил с logrotate -v ;) )

8
18.11.2014, 02:25
1 ответ

Это говорит rsync смотреть в каждом каталоге для файла .gitignore :

rsync --filter='dir-merge,-n /.gitignore' [...]

, которое должно делать то, что вы хотите.

-N -N после DIR-MERGE означает, что ( - ) - ) файл определяет только исключения и ( N ) правил не наследуются подкатариатами.

15
27.01.2020, 20:10

Теги

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