Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通常tail -f、すでにログに記録された 10 ~ 15 個のコンテンツが表示されます。どうすれば回避できますか?新しくログに記録されたコンテンツのみを表示したい。そのための tail コマンドにスイッチはありますか? ご意見をお聞かせください。
tail -f
ゼロ行を返すように設定するだけです:
tail -n 0 -f /var/log/syslog
マンテール:
-n, --lines=K output the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth