The Archives

  • 02.Mar.09
    Adding ‘tail -f’ behavior to ‘less’ cmd | rafacas | (0)
    $ less +F /var/log/messages The +F option turns on less 'follow mode'. It is similar to tail -f but you will have the benefits of less, like scrolling up and down. To stop tailing, use Ctrl-C and to resume it, press Shift-F.
  • 20.Feb.09
    Displaying last lines of a file in real time cmd | rafacas | (0)
    $ tail -f /var/log/messages Displays continously (in "real time") the last lines of /var/log/messages as it grows.
  • 17.Nov.08
    Output last lines of a file cmd | rafacas | (0)
    $ tail -20 test.txt Outputs the last 20 lines of file test.txt
  • 15.Aug.08
    Looking at the End shell | fernape | (0)
    From time to time we want to see only a few lines near the end of a file. We often use cat or more, but this can be tedious when the file is big (like a very long log file). You can use these commands to read from the end of the file: tac. It works exactly as cat but reading from the end of the file tail. It reads from the end of the file. It has more features than tac. The one I found to be more interesting is the -f flag. It makes tail to continue reading from the ...