RPi Bのrsyslog.confで/var/logと-/var/logの違いは何ですか?

RPi Bのrsyslog.confで/var/logと-/var/logの違いは何ですか?

/etc/rsyslog.conf私のファイルで、いくつかのターゲットの前に「-」記号が付いていることを確認しました。たとえば、

mail.info        -/var/log/mail.info
mail.warn        -/var/log/mail.warn
mail.err         /var/log/mail.err

または

news.crit        -/var/log/news/news.crit
news.err         /var/log/news/news.err
news.notice      /var/log/news/news.notice

答えが見つからないか、十分に深く見ていないものかもしれません。私は3日前にRPi旅行を始めました。私はまったく経験がありません。さて、今は少しあります:)動作するiptablesを正しく設定し、他のファイルに書き込むように管理しましたが、それらを除外することは/etc/log/kern.logまったく大きな問題ではないかもしれません。

-/var/しかし、違いは何ですか/var/

私のRpiはRaspbian GNU / Linux 7(gasp)を使用しています。

ラデック

ベストアンサー1

マンページからRSYSLOG.CONF(5)

By default, files are not synced after earch write. To  enable  syncing
of log files globally, use either the "$ActionFileEnableSync" directive
or the "sync" parameter to omfile. Enabling this option  degrades  per‐
formance  and  it is advised not to enable syncing unless you know what
you are doing.  To selectively disable syncing for certain  files,  you
may prefix the file path with a minus sign ("-").

したがって、同期が有効になっている場合は、書き込み量が多いと予想されるファイルを除外することが望ましいようです。同期が無効(デフォルト)の場合、マイナス記号は効果がありません。

おすすめ記事