Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hello I have rare situation and no sure if this really fails.

I am monitoring a file , I get the size using ls -ald and then i run tail -n command but sometime i see increase in the size but tail -n does not return anything.

Any clue on why this could happen.

share|improve this question

migrated from stackoverflow.com Feb 14 '11 at 7:33

This question came from our site for professional and enthusiast programmers.

    
Are you absolutely sure that no process is shrinking that file? –  Olli Feb 14 '11 at 7:42
    
What type of file is it? –  aqua Feb 14 '11 at 7:49
    
what does wc say about it? –  Dennis Williamson Feb 14 '11 at 8:24
add comment

1 Answer 1

If you are monitoring a file, then you expecting that it is being written to (growing in size)? Yes?

Try

tail -f -n${Number} filename

From tail --help (on MingW)

-f, --follow[={name|descriptor}]
           **output appended data as the file grows**;
            -f, --follow, and --follow=descriptor are equivalent

I hope this helps.

P.S. as you appear to be a new user, if you get an answer that helps you please remember to mark it as accepted, and/or give it a + (or -) as a useful answer

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.