473,395 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

notification of file truncate

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

Jun 27 '08 #1
0 790

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Brandon McCombs | last post by:
This may be the wrong group but I didn't see anything for VC++ so I'm trying here. I have a C++ book by Deitel and Deitel that says I can use fstream File("data.dat", ios::in | ios::out |...
4
by: Amit Kulkarni | last post by:
Hi, I have small problem. I want to truncate a line in a text file using C file handling functions and write new line in place of it. How do I do it? e.g. "example.txt" Line 1: This is a...
1
by: venkat | last post by:
Hi, Can any one tell me the best way to truncate a file if it exceeds a specified file size? I need to truncate the start of the file by the appropriate amount (The data to insert). Is there any...
4
by: Xero | last post by:
Hello. How do you clear the content of a *.txt file? Thanks. -- Xero http://www.chezjeff.net My personal web portal
14
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given...
1
by: hedgracer | last post by:
I would like to allow a particular user to truncate a log file in a stored procedure that the user runs every day. At this moment the only personnel that can truncate the log file are personnel...
6
by: JackC | last post by:
Hi, My program takes a series of encoded file segments, and decodes each segment and writes it to the output file. I am trying to approach this as follows: I know the size of the output...
8
by: Kevin K | last post by:
Hey everyone, I'm new to python and am trying to do a little project with it. I'm running into problems writing over a file. I read from the file and loop through for a specfic case in which I...
2
by: s0suk3 | last post by:
file.truncate(X) will truncate the file to at most X bytes (i.e. leave the first X bytes of the file and throw away the rest). Is there a way to throw away, say, the first X bytes of the file, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.