Welcome to the Monastery | |
PerlMonks |
Re^2: Monitoring when a file openedby Angel (Friar) |
on Jan 21, 2005 at 19:14 UTC ( [id://424108]=note: print w/replies, xml ) | Need Help?? |
Well what I am trying to do is make a simple lock-modify-unlock file system hack. We have three people who cannot play nice. It happend about once a month that the one wipes out anothers line of text. The files are on a samba share but the end users are still using notepad and do not want to change. One of those end users signs my check and is adamant about it CVS is probably too hard for them and this is my last try before I say you have to use cowiki for your text files. My idea is 1. User A opens file X 2. Script is triggered 3. Script renames file to X.1 ect and backup of old copy saved in a sub directory 4. Script edits the existing text file to say User: JDoe is editing file X, so that if they open it they dont make changes 5a. JDoe saves the file and it's therefore overwritten, script then triggered again and saves his changes as well 5b. Cron script runs every few hours and puts the backup back. If boss man leaves his file open with changes for three days ( yes I am serious ) and then saves wiping out everyones work for the last two days It's sime and it should work, if I could get CVS tortise or something to basically ( on save of this file add to the repository ) I'd be golden but I cant figure out how and since they all use the same files on the share there are no sandboxes. Yuck huh?
In Section
Seekers of Perl Wisdom
|
|