notification of file truncate

  • Thread starter nishant.deshpande
  • Start date
N

nishant.deshpande

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..
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top