How can I tail -f but only in whole lines? <p>I have a constantly updating huge log file (MainLog).</p> <p>I want to create another file which is only the last n lines of the log file BUT also updating.</p> <p>If I use:</p> <blockquote> <p>tail -f MainLog > RecentLog</p> </blockquote> <p>I get ALMOST what I want except RecentLog is written as MainLog is available and might at any point only have part of the last MainLog line.</p> <p>How can I specify to tail that I only want it to write when a WHOLE line is available?</p>