Quite often as a developer, I need to monitor the state of something. Whether it be a list of files, the state of a process or the output of a command, it’s very useful to be able to do this easily.
Enter the watch command.
Just install with homebrew and you’re ready to roll.
$ brew install watch $ watch -h
I’m using this to great effect to monitor the state of local Docker containers and volumes. Something like this works a treat:
$ docker ps --all --filter name=blog && echo && docker volume ls --filter name=blog
You should then get this kinda thing:
Hope that helps.