The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Test automation tool for UNIX ?? unmanju Shell Programming and Scripting 4 10-11-2008 09:51 AM
Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server madhunk UNIX for Dummies Questions & Answers 5 01-31-2008 10:30 AM
Free monitoring tool on Unix salhoub UNIX for Advanced & Expert Users 1 07-05-2005 04:37 AM
Tool top daemon SUN Solaris 2 08-04-2004 07:36 PM
Archival Tool for UNIX sanjeev0915 UNIX for Dummies Questions & Answers 7 10-23-2001 01:07 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-17-2007
Registered User
 

Join Date: Aug 2007
Posts: 12
Help to enchance unix tool..

HI friends ,

I was assigned to enhance tool in unix solaris...the tool is totaly developed on shell and perl scripts...

The tool is used to change control files....The users are of certain group..
due to many users some people are changing these control files directly by using editors ....they are not using tool to change control files.

In the tool it has feature that it will not allow multiple user to write at a time.
But other user can change by using editors ...So we need to stop this...

Please help me in this regard....

I thought file locking...but dont know how to implement...
Reply With Quote
Forum Sponsor
  #2  
Old 12-17-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 798
here is a good starter for you
Reply With Quote
  #3  
Old 12-17-2007
Registered User
 

Join Date: Aug 2007
Posts: 12
Sorry yaar sawant i have tried but its not working..still the file open with editor.
Reply With Quote
  #4  
Old 12-17-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by Nagabhushan View Post
Sorry yaar sawant i have tried but its not working..still the file open with editor.
From the link above...
Quote:
Open files and programs are not automatically locked in UNIX.
If a program does not care about locks it will not abide by them. Locks are an afterthought in UNIX, not fundamental like in Windows NT.
Reply With Quote
  #5  
Old 12-18-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 798
you probably need make use of fcntl

for example, if you are using Perl, then refer to this
Reply With Quote
  #6  
Old 12-18-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by Yogesh Sawant View Post
you probably need make use of fcntl

for example, if you are using Perl, then refer to this
But they don't stop user "joe" using editor "fred" to edit a file and ignore the locks.
Reply With Quote
  #7  
Old 12-18-2007
Registered User
 

Join Date: Aug 2007
Posts: 12
is there any way to stop changing the file using editors...except

permissions...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
fcntl, file locking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0