Skip to main content
deleted 97 characters in body
Source Link
Graeme
  • 34.6k
  • 9
  • 90
  • 110

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat < "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat < "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat < "$file" done 
deleted 4 characters in body
Source Link
Stéphane Chazelas
  • 586.4k
  • 96
  • 1.1k
  • 1.7k

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat -f --< "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat -f -- "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat < "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

deleted 1 characters in body
Source Link
Graeme
  • 34.6k
  • 9
  • 90
  • 110

If on Linux, something like this should do what you are looking for:

inotifywait -m -e createclose_write --format %w%f -r /watch/dir | while IFS= read -r file do tailcat -f -- "$file" & done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e create --format %w%f -r /watch/dir | while IFS= read -r file do tail -f -- "$file" & done 

The only problem then is what to do if an excessive number of tail processes are started...

If on Linux, something like this should do what you are looking for:

inotifywait -m -e close_write --format %w%f -r /watch/dir | while IFS= read -r file do cat -f -- "$file" done 

The only problem then is what to do if an excessive number of tail processes are started...

inotify is Linux specific, %f gives the file name
Source Link
Stéphane Chazelas
  • 586.4k
  • 96
  • 1.1k
  • 1.7k
Loading
added 9 characters in body
Source Link
Graeme
  • 34.6k
  • 9
  • 90
  • 110
Loading
Source Link
Graeme
  • 34.6k
  • 9
  • 90
  • 110
Loading