hi i am new to unix,i want a command that will sleep for 10sec and show last 100 line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rchaitanya
    New Member
    • Feb 2010
    • 1

    hi i am new to unix,i want a command that will sleep for 10sec and show last 100 line

    i want a command that will sleep for 10sec and show last 100 lines in unix log file

    i am using

    tail -f -s10 -n100 filename (this command showing 100 lines only once, but as the file is appending i am unable to view the next 100 lines)

    Plz guide me...
  • shabinesh
    New Member
    • Jan 2007
    • 61

    #2
    i too was not able to do it with that command, so, here is my script

    $ for i in `seq 1 100`;do tail -n100 filename ;sleep 10; done;

    Here the problem is the loop is not infinite, but i think large value can make it . :)

    Comment

    Working...