title: Linux tail + grep + less
body: <p>I want to see live output from my website's access log. I want to see only certail types of entries, in this case, entries that match ".php".</p>
  
  <p>This works fine, but lines wrap to the next line and I don't want that:</p>
  
  <pre><code>tail -f access-log | fgrep ".php" --line-buffered
  </code></pre>
  
  <p>This works fine for avoiding the line wrapping, but it is not filtered:</p>
  
  <pre><code>less +F -S access-log
  </code></pre>
  
  <p>I prefer looking at the file without lines wrapping to the next line because it is easier to see the structure in the output, this is what I want <code>less -S</code> for.</p>
  
  <p>This kind of works, but the "cursor" doesn't stay at the bottom of the file, and any command I enter makes <code>less</code> hang (press "SHIFT + f" for staying at the bottom as the stream comes):</p>
  
  <pre><code>tail -f access-log | fgrep ".php" --line-buffered | less -S
  </code></pre>
  
  <p>But this doesn't work at all:</p>
  
  <pre><code>tail -f access-log | fgrep ".php" --line-buffered | less +F -S
  </code></pre>
  
  <p>So, is there a way to achieve the what I want?</p>
  
  <p>I also take outside-the-box solutions, maybe cutting with <code>sed</code> so that each line is never longer than my screen?</p>