Is there a way to create special files under Linux that would keep only, say the 100 last written lines? I have a process filling a log file, and I'd like to regularly parse its 100 last lines.
I know I could use some kind of logrotate, but is there a way to create a special file that would fill up till it reaches 100 lines, then, adding a line removes the oldest one, so that the file only keeps 100 lines? (a kind of line-based FIFO)
Thanks a lot