How to tail -f real time file.
I want to tail file created last time.
The server is gen new file Always.
.
An example file.
-rw-r--r-- 1 shinnie tiituck 251M Oct 18 05:39 20111018_00.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 18 11:18 20111018_01.log
-rw-r--r-- 1 shinnie tiituck 250M Oct 18 16:56 20111018_02.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 18 22:34 20111018_03.log
-rw-r--r-- 1 shinnie tiituck 64M Oct 18 23:59 20111018_04.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 19 05:38 20111019_00.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 19 11:17 20111019_01.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 19 16:48 20111019_02.log
-rw-r--r-- 1 shinnie tiituck 251M Oct 19 22:25 20111019_03.log
-rw-r--r-- 1 shinnie tiituck 70M Oct 19 23:59 20111019_04.log
I can use this command it.
tail -f 201110??_??.log |grep "same key word"