I've been working with smstools3 which uses a folder and its subfolder as its state store.
Instead of running "tree" manually in the /var/spool/sms folder, i'd rather have it be done automagically whenever the files change.
I've used inotifywait for that, which needs to be installed on ubuntu with
sudo apt install inotify-tools .
Then it's just a matter of cd-ing to the proper directory and running :
clear && tree && inotifywait --monitor --quiet --recursive --event modify . | while read; do clear; tree; done