Watch – A Unix command to tail directories

1 min. read Published: Updated at:

My Unix CLI command of the day: watch – execute a program periodically, showing output fullscreen. It can be used for various use cases, for example investigating filesystem changes of a directory with

watch -d ls -l

The watch command has some options for configuration:

watch [-dhvt] [-n ] [–differences[=cumulative]] [–help] [–interval=] [–no-title] [–version]

While the -d option you just run watch as a deamon, making it execute the given command every 2 seconds be default. To increase or decrease the interval, use the --intervall=[seconds] option. There is a more detailed blog post available over at beerpla.net.

Webmentions

0 Mentions
0 Reposts
Likes