Sponsored Content
Full Discussion: File Locking
Top Forums UNIX for Advanced & Expert Users File Locking Post 69079 by Perderabo on Monday 11th of April 2005 12:47:32 PM
Old 04-11-2005
This depends on a lot things. If the processes both opened the file in append mode and really are doing write's, it should work ok. Multiple processes can all write to a common log file this way. Without append mode, they may step on each other. Your thread title mentions file locking. If the processes are using file locking correctly they cannot simultaneously write. If a process has a manditory lock on a file region, another non-root process will block if it attempts a write on that region. Advisory locks can be ignored. "man lockf" should give you more info about file locking.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp file locking

I have a set of scripts to do software releases to remote machines which uses ftp. I'm having a problem getting 'lost connection' messages. What I wanted to ask is, does ftp employ some sort of file locking if two ftp processes are trying to copy the same file at the same time? & if so could... (2 Replies)
Discussion started by: Kevin Pryke
2 Replies

2. UNIX for Dummies Questions & Answers

file locking question

Hi, Simple question but I just need to confirm the answer: If two or more processes attempt to move the same file at exactly the same time, will unix internal file locking allow only one of the processes to access the file? Many thanks Helen :) (2 Replies)
Discussion started by: Bab00shka
2 Replies

3. UNIX for Dummies Questions & Answers

File Locking in Unix

Hi I would like to lock a file using korn Shell Script before coping the contents of the file. Do let me know Thanks in Advance. Senone (3 Replies)
Discussion started by: senone
3 Replies

4. UNIX for Dummies Questions & Answers

Locking a file in ksh

We want to lock a file, during a program(pgm1) execution(until the execution of the program is completed), so that other program(pgm2) can't read/edit that file, until execution of earlier program(pgm1) is completed. How can this be achieved thru shell scripting... we tried chmod +l option, but... (1 Reply)
Discussion started by: thanuman
1 Replies

5. UNIX for Dummies Questions & Answers

file locking

how do i implement file locking in unix? example if i want to update a file, i would like to use file locking. how do i implement it? i am using shell script thanks (3 Replies)
Discussion started by: yang
3 Replies

6. UNIX for Dummies Questions & Answers

how to do file locking?

how to ensure all files are being locked while updateing some files? example when i want to update the password and shadow file in unix. how do i implement file locking?? please advice thanks (2 Replies)
Discussion started by: yang
2 Replies

7. UNIX for Advanced & Expert Users

File locking

i am working on a device runnin on linux....i have configured the samba server in the device such that my windows PC can access a shared folder in the device. Also in the device i am runnin some programs which access the files in this shared folder. What i want to know is whether there is any way i... (1 Reply)
Discussion started by: abhinx
1 Replies

8. Solaris

Help with set GID File Locking

Hello, I ls -al to see the permission of a file and there is 1 file have strange permission. It's a "l" instead of "x". -rwxr-lr-x 1 root other 24905 Jan 11 2007 /etc/vx/isis/Registry.pre-ddlpro -rw-r-lr-- 1 root root 0 Jan 6 43:25... (2 Replies)
Discussion started by: Smith
2 Replies

9. UNIX for Advanced & Expert Users

NFS4 locking file question

All, Just wondering if someone has a file open on client A for writing and it is locked, is that file still readable from client A or B? Basically I'm just wanting to know if a file is opened already, can it still be opened for read only? (1 Reply)
Discussion started by: markdjones82
1 Replies

10. Emergency UNIX and Linux Support

Perl NFS file locking

Got a weird problem. I have a user that inherited a data processing system written in Perl. The system consists of about 150 Perl scripts and about 40 Fortran executables. The system had been working fine until recently, when I changed our file server configuration. First the system... (2 Replies)
Discussion started by: ccj4467
2 Replies
proplist(4)						     Kernel Interfaces Manual						       proplist(4)

NAME
proplist - The storing, parsing, and retrieving of Extended File Attributes DESCRIPTION
Tru64 UNIX supports the storing, parsing, and retrieving of Extended File Attributes. An Extended File Attribute is a name and value pair that is contained in a variable-sized structure called a Property List. A Property List is part of a file's metadata and can contain abstract name and value pairs (Extended File Attributes) that can be set either by the operating system (for example, ACLs and privileges) or by a user-level application (for example, PC File Attributes). Since Extended File Attributes are treated as an extension to a file's metadata, they are synchronously updated, thereby ensuring consis- tency. Note that Extended File Attributes set by user-level applications are treated as opaque and can be virtually anything. To ensure that all Property List names are unique, you must register your Property List names with Compaq. Those Property List names with a prefix are reserved by Compaq. In the case of conflicts, Compaq reserves the right to arbitrate the naming conventions of Property Lists. To register a Property List name, send a request by network mail to or write to: Tru64 UNIX File System Group ATTN: Property List Administrator Compaq Computer Corporation 110 Spit Brook Road Nashua, NH. 03062-2698 M/S ZKO3-3/U14 Several user-level routines, listed in the Related Information section, work together to manipulate Extended File Attributes. For example: To set attributes, you use the sizeof_proplist_entry(3) and add_proplist_entry(3) routines to initialize the Extended File Attribute buffer passed to setproplist(3) or fsetproplist(3). To fetch attributes, you use getproplist(3) or fgetproplist(3). To parse the attribute buf- fer returned by setproplist(3) or fsetproplist(3), use the get_proplist_entry(3) routine. The format of the Extended File Attributes buffer, the values of the system-wide properties, and the format of the Property List structures are all defined in sys/proplist.h. NOTES
Extended File Attributes are supported by the Advanced File System (AdvFS), the UNIX File System (UFS), and the Network File System (NFS). The latter through the use of the proplistd daemon and the mount -o proplist command. The archive utilities and support files with Extended File Attributes. However, third-party archive utilities may not support Extended File Attributes and, consequently, if they are used on files with Extended File Attributes, the Extended File Attributes will be lost. RELATED INFORMATION
Functions: add_proplist_entry(3), delproplist(3), fdelproplist(3), fgetproplist(3), fsetproplist(3), get_proplist_entry(3), getproplist(3), setproplist(3), sizeof_proplist_entry(3). Files: libproplist.a, libproplist.so, sys/proplist.h, acl(4). Daemons: proplistd(8). delim off proplist(4)
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy