I want to tail a bunch of unknown directories names containing a particular non-existant file, e.g.:
tail -F /tmp/*/app.log
However that does not work as intended with the wildcard: if I create a file with that path, tail
won't start following unless I restart the command. On the other hand if I run:
tail -F /tmp/example/app.log
as soon as the file appears the command will output: tail: '/tmp/example/app.log' has appeared; following new file
I have tried the -f filename --retry
combination instead of -F
and the result is the same.
How can that be solved and are there any other ways to achieve the same goal?