Tail -f on newly-created files with unknown names
I don't think there's a direct way to do with with tail
without knowing the name - if you knew that then tail --follow=name --retry
would work and it would wait for the file to appear and then start following it.
I'd suggest writing a little shell script that uses inotifywait
to watch for the file appearing and then starts tail -f
to follow it.