notification of file truncate

Discussion in 'Python' started by nishant.deshpande@gmail.com, May 6, 2008.

  1. Guest

    hi,

    I am running ubuntu 7.1 (linux 2.6.22-12-generic)

    i was trying to implement 'tail -f' (well tail -F actually but for
    this example i think its not relevent) and one of the features which i
    couldn't get in python was notification of truncation of a file.

    i looked at the inotify (the pyinotify package) and then the linux
    inotify functionality.

    i don't see the truncation notification anywhere... yet tail -F
    notifies that the file has been truncated and repositions its offset
    at top of the file to print out the next lines.

    can anyone shed some light on this? i guess i need to look at the bash
    tail code..
     
    , May 6, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    531
    Jack Klein
    Jun 5, 2004
  2. Natevw

    truncate end of file

    Natevw, Nov 3, 2004, in forum: C++
    Replies:
    1
    Views:
    3,203
    Victor Bazarov
    Nov 3, 2004
  3. Amit Kulkarni

    HOW-TO Truncate first line in a file to zero length?

    Amit Kulkarni, Jun 22, 2004, in forum: C Programming
    Replies:
    4
    Views:
    3,682
    dbtid
    Jun 23, 2004
  4. Replies:
    0
    Views:
    2,081
  5. Leslie Viljoen

    File#truncate fills file with zeros

    Leslie Viljoen, Nov 16, 2010, in forum: Ruby
    Replies:
    1
    Views:
    149
    Leslie Viljoen
    Nov 16, 2010
Loading...

Share This Page