File Locks


 
Thread Tools Search this Thread
Operating Systems HP-UX File Locks
# 1  
Old 05-08-2008
File Locks

Hi,
How to list the files which are not locked?

I want to read the files that are not locked by other user only.

can we do it using ls option?
# 2  
Old 05-08-2008
At least, I could say that ls command is not really helpful.
But, you can try atime, mtime and ctime to find recently accessed files.
Smilie
lsof could help also.
Good luck.
# 3  
Old 05-08-2008
lsof on HPUX is called fuser. It does not report locked files. In order to find locked files, you have to open() files then try lockf() in C code.

AFAIK HPUX systems only have mandatory file locking on Regular files with the file mode of S_ENFMT.

What are your trying to accomplish?
# 4  
Old 05-09-2008
Quote:
Originally Posted by jim mcnamara
lsof on HPUX is called fuser.
Just I would like say, that lsof and fuser are different.
# 5  
Old 05-09-2008
lsof does not exist for HPUX unless you install it from the HPUX Porting Centre. Yes, they do not behave the same.
# 6  
Old 05-11-2008
Quote:
Originally Posted by jim mcnamara
lsof does not exist for HPUX unless you install it from the HPUX Porting Centre. Yes, they do not behave the same.
Ok, I aggree.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Passwd -f locks out login

hello; I have inherited a SunOS sjcorpftp 5.10 Generic_118855-36 i86pc i386 i86pc whenever someone needs a new password, I change it via "passwd username" then "passwd -f username" so they can change their password on my only sun sparc 5.9 you can "accessed denied" when you... (0 Replies)
Discussion started by: ikeleong
0 Replies

2. Shell Programming and Scripting

How to avoid locks while loading database through UNIX script.?

Hi, I have the following requirement: I have load_cdr as main scriptwhich loads all the file records into vertica database through unix script. But there are two files which try to update same table..n thats y my script is getting failed... Can any1 give me some logic how to over come this... (6 Replies)
Discussion started by: gnnsprapa
6 Replies

3. Programming

help with write-read locks inter-process

I need help!Many Thanks! Now,I try to manage the shared memory inter-process . Inevitably,I have to deal with the synchronous. I know the pthread_rwlock in posix,and I compile ,then run successfully in Red Hat Enterprise 4. I have a doubt about whether the Posix supports the system such as... (1 Reply)
Discussion started by: weizh
1 Replies

4. AIX

password locks after user killed

We are finding sometimes after a user process has been killed, when the user tries to reconnect, he gets the message that there has been too many attempts and his password is locked. Has anyone see this? AIX 5.3 tl9 sp3 thanks (0 Replies)
Discussion started by: MizzGail
0 Replies

5. UNIX for Advanced & Expert Users

current locks on a file

I want to know all the locks on a file - read, write etc acquired by various processes. Is there any way to know ? (2 Replies)
Discussion started by: radiatejava
2 Replies

6. Linux

Whats for: /etc/locks directory?

Hi there! Can someone please tell me what is for the directory /etc/locks and provide me with an example. I certainly don't understand it very well. Any help will be much appreciated! (1 Reply)
Discussion started by: agasamapetilon
1 Replies

7. UNIX for Advanced & Expert Users

SCP / SFTP successful but locks out target account

Hi, We have an interesting problem with F-Secure SSH (v 3.1.0) running on HP-UX. It seems that when scp or sftp commands are issued they are successful but it counts as a 'strike' against the target user locking the account out after 3 attempts. When the user is re-enabled in SAM - it reports... (4 Replies)
Discussion started by: b0bbins
4 Replies

8. Solaris

Checking/ Releasing File Locks in Solaris

Hi, One of my prod jobs using Ab Initio (which is Solaris Based) returned this error: ========= Error from Reformat_3.000 on f7j21-01.xxxx3.com ========= Failed opening file for flow: Resource temporarily unavailable Flow = "Flow_11.000" connected to output port "out0" of "Reformat_3.000"... (0 Replies)
Discussion started by: teenu18
0 Replies

9. Programming

Read/write locks within and between processes. Can you help?

I have an application that is multithreaded and concurrent. Multiple instances of the application must run at the same time. Each thread in each process accesses shared resources. For this purpose I've employed Butenhof's read-write locks. Inter-process locking is based on fcntl. For example,... (3 Replies)
Discussion started by: adamb
3 Replies

10. UNIX for Dummies Questions & Answers

"File in use" - how to identify locks on this file and release them?

At times we see the "file in use" when we run RCS (revision conrol system" on this file. Most of time, we do not see this message. How do we identify the locks on this file and how do we release those locks? I can imagine it happens when there are some processes running on this file. THe... (1 Reply)
Discussion started by: vadimsf
1 Replies
Login or Register to Ask a Question