I am using CentOS 5.5. There is a CSV file in a particular directory(/somewhere/somefile.csv) where a software continuously appending comma separated row(s) of data time to time and the file size is growing big (currently it's 50MB+). My idea is to create a demon to watch the CSV file. Whenever any row(s) of data appended in that CSV file the demon will read the last appended row(s) and create/write it in a separate text file by date. I would like to know:
I have googled tons of time but didn't find any good idea/solution(s). Please help. Thanks in advance. asked 18 Jul '12, 03:23 tanveer |
You can try inotify or incron. Starting with kernel 2.6.13, Linux provides the inotify mechanism, which allows an application to monitor file events. or you can write your own program as described on http://www.ibm.com/developerworks/linux/library/l-ubuntu-inotify/index.html answered 01 Aug '12, 03:33 savotije |