The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
monitoring a specific file on Tru64 aladdin UNIX for Dummies Questions & Answers 5 07-13-2007 10:41 AM
Monitoring magasem AIX 1 11-06-2006 05:27 AM
File growth monitoring jeyanthan_kr Filesystems, Disks and Memory 1 05-18-2006 02:32 PM
Monitoring file in a directory pete_leon Shell Programming and Scripting 3 11-12-2005 02:30 PM
file system monitoring script g-e-n-o Shell Programming and Scripting 1 04-08-2002 03:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-24-2006
problems problems is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 7
file monitoring

Hi i am am monitioring a file every 60 seconds and checking if the file has changed and if it has changed i append the changes to another file. i am able to monitior the change in file size but i have a problem copying the changes made in the file to another file. i am using lseek to seek the last position of the file before changes were made
  #2 (permalink)  
Old 08-24-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
if the changes made to the file that is monitored is only update at the end ... (appending )

then with
file size of the unmodified file x
and the size of modified file y

then append ( y -x ) bytes to the new file by positioning the file pointer in the modified file directly to (x + 1)th byte
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0