The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SCP / SFTP successful but locks out target account b0bbins UNIX for Advanced & Expert Users 4 03-27-2008 11:50 AM
Checking/ Releasing File Locks in Solaris teenu18 SUN Solaris 0 01-09-2008 11:47 PM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 01:25 AM
Read/write locks within and between processes. Can you help? adamb High Level Programming 3 02-13-2006 08:35 AM
"File in use" - how to identify locks on this file and release them? vadimsf UNIX for Dummies Questions & Answers 1 09-05-2003 12:10 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: Jan 2008
Posts: 20
Stumble this Post!
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?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: Oct 2007
Location: Tunisia
Posts: 11
Stumble this Post!
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.

lsof could help also.
Good luck.
Reply With Quote
  #3 (permalink)  
Old 05-08-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,812
Stumble this Post!
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?
Reply With Quote
  #4 (permalink)  
Old 05-09-2008
Registered User
 

Join Date: Oct 2007
Location: Tunisia
Posts: 11
Stumble this Post!
Quote:
Originally Posted by jim mcnamara View Post
lsof on HPUX is called fuser.
Just I would like say, that lsof and fuser are different.
Reply With Quote
  #5 (permalink)  
Old 05-09-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,812
Stumble this Post!
lsof does not exist for HPUX unless you install it from the HPUX Porting Centre. Yes, they do not behave the same.
Reply With Quote
  #6 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: Oct 2007
Location: Tunisia
Posts: 11
Stumble this Post!
Quote:
Originally Posted by jim mcnamara View Post
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mtime

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:42 PM.


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

Content Relevant URLs by vBSEO 3.2.0