111 words
1 minutes
Shell, watch file content as it populates

Shell, watch file content as it populates#

Watching file content as it populates can be useful for monitoring logs and other dynamic files. This guide explains how to watch file content in the shell.

Using tail -f#

The tail -f command allows you to watch the content of a file as it grows.

tail -f file_name

Using less +F#

The less +F command also allows you to watch the content of a file. Press Ctrl+C to stop watching and return to normal less mode.

less +F file_name

Conclusion#

By using tail -f or less +F, you can easily watch the content of a file as it populates. These commands are useful for monitoring logs and other dynamic files in real-time.


Shell, watch file content as it populates
https://zxce3.net/posts/shell-watch-file-content-as-it-populates/
Author
Memet Zx
Published at
2021-02-01