08-08-2001
First of all its not 'STATUS.LCK'. its 'STATUS..LCK '. Can you see any defference.
try
#touch /var/lock/samba/STATUS..LCK
The STATUS..LCK file is created as soon as someone accesses a file shared by samba.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there any commands in UNIX, like isopen(),isclose() to know whether a file has been opened for read/write purpose.?
Thanks (3 Replies)
Discussion started by: Pal
3 Replies
2. Filesystems, Disks and Memory
Hi, guys, I have a big problem.
I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It soon becomes a large file.
I wander if there are some mistakes configuring the workstation.
the /var/adm/message is as follow:
... (1 Reply)
Discussion started by: cloudsmell
1 Replies
3. UNIX for Dummies Questions & Answers
Hi, guys, I have a big problem.
I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It becomes a large file in a short time.
I wander if there are some mistakes configuring the workstation.
the /var/adm/message is as follow:
... (3 Replies)
Discussion started by: cloudsmell
3 Replies
4. Shell Programming and Scripting
Hi,
We have a text file which has the following data.
ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183
7~U~00200~000011258~0~P~<
GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002
ST~997~0001
AK1~SH~247
AK2~856~2470001
AK5~A
AK2~856~2470002
AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies
5. Red Hat
I have successfully installed RedHat 8.0 onto a Dell PowerEdge SC1425 today. This server has two SATA hard drives, and an IDE DVD-ROM drive.
Using the following kernel parameters, i successfully installed across both hard drives from CD:
ide0=0x1f0,0x3f6,14 vga=791 resolution=1024x768 expert... (5 Replies)
Discussion started by: fishsponge
5 Replies
6. Shell Programming and Scripting
I write a script which will stop an application, then restart it.
Sometimes it is succesful, sometimes not.
The problem is, when stop the application, some ports are still listenning (or not released). When start the application, it reports that ports are used, and can't continues.
I use... (1 Reply)
Discussion started by: rdcwayx
1 Replies
7. UNIX for Dummies Questions & Answers
Hello,
Sorry for my english.
I have an arcade site.
mydomain.com/game.html If database has the game name is good.
mydomain.com/fd43f54.html if database has not the game name redirect to mydomain.com by 302 error code.
if database has not the game name i want a 301/404 error code and no... (0 Replies)
Discussion started by: hoo
0 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
how to know the status of a file to whether it is copied partially from the source location or completly copied. Appreciate your quick reply on this.
---------- Post updated at 05:16 AM ---------- Previous update was at 04:34 AM ----------
#!/bin/ksh
file_nm=$1
no_of_tries=5... (2 Replies)
Discussion started by: palanisvr
2 Replies
9. Programming
Dear Team
I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update )
Scenario
We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies
10. UNIX for Beginners Questions & Answers
How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies
LEARN ABOUT CENTOS
lockdev
LOCKDEV(3) Linux Programmer's Manual LOCKDEV(3)
NAME
lockdev, liblockdev, dev_testlock, dev_lock, dev_relock, dev_unlock - manage device lockfiles
SYNOPSIS
#include <lockdev.h>
pid_t dev_testlock( const char * devname);
pid_t dev_lock( const char * devname);
pid_t dev_relock( const char * devname, pid_t pid);
pid_t dev_unlock( const char * devname, pid_t pid);
cc [ flag ... ] file ... -llockdev [ library ]
DESCRIPTION
The lockdev functions act on device locks normally located in /var/lock . The lock is acquired creating a pair of files hardlinked between
them and named after the device name (as mandated by FSSTND) and the device's major and minor numbers (as in SVr4 locks). This permits to
circumvent a problem using only the FSSTND lock method when the same device exists under different names (for convenience or when a device
must be accessable by more than one group of users).
The lock file names are typically in the form LCK..ttyS1 and LK.000.004.065 , but is provided a way to easily modify them to use the
library on different architectures. The content of those files is the pid of the process who owns the lock.
The dev_testlock() function simply checks if the device is in some way locked and if the owner of the lock is still active (otherwise it
removes the lock). It recognise a valid lock even if only one of the two lock files exists (and is owned by an existing process), thus
permitting a safe use of this library together with programs using only FSSTND or SVr4 lock style.
The dev_lock() function first checks if the device is already locked and then tries to acquire the lock building the two lock files. First
it creates the file which name contains the major and minor numbers (in SVr4 style), then it creates the file with the device name in its
name. This order reduces the clashes with other processes trying to lock the same device (even with a different name) and using this
library. It has no problem with processes that uses only the FSSTND algorithm.
The dev_relock() function changes the owner of an existing lock; if the pid of the old owner is provided, then it checks if the lock was
correctly assigned (otherwise there is the possibility of a process acquiring a lock which was owned by another unrelated process). If the
device was not locked, locks it.
The dev_unlock() function removes the existing locks on the device. If the pid of the owner of the lock is provided, then it checks if the
lock is assigned to that process, avoiding to remove locks assigned to other existing processes.
RETURN VALUES
All the functions in lockdev library return ZERO on successfull completion of the function (dev_testlock returns zero if there is no lock
on the device), otherwise, if the device is currently locked by an existing process, they return the pid of the process owner of the lock.
They return a negative number when some kind of error happens. Actually they all return only (-1).
FILES
/var/lock/LCK..<device>
/var/lock/LK.<devmajor>.<major>.<minor>
/usr/lib/liblockdev.so.1
HISTORY
(c) 1997 by Fabrizio Polacco <fab@prosa.it>.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pub-
lished by the Free Software Foundation; version 2 dated June, 1991.
Linux Manpage 26 Dec 1997 LOCKDEV(3)