How to list locked file in unix?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to list locked file in unix?
# 1  
Old 01-09-2009
How to list locked file in unix?

Hi,
I want to list out all files which are lock by some process.

ex- ~/critical

I want to list all files in critical directory which has been locked.
I need this very badly. Any suggestion highly appriciated.


Regards,
Ashok
# 2  
Old 01-09-2009
man fuser
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check the file locked or in use at FTP?

Hi Experts, I am beginner to shell scripting, I have a archive script which will connect to the FTP server and archive the files from FTP source location to FTP archive location. Now the problem here is, the script working for few files and not working for few.I am facing the below error... (1 Reply)
Discussion started by: spidy
1 Replies

2. Shell Programming and Scripting

How to kill the process when the file is locked?

I was trying to read the file to create a table in SAS and I got error as follows while I read. Resource is write-locked by another user. File =/usr/sas/sas_config/Lev1/SASApp/StoredProcessServ​er/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code = 0. ERROR: File is in... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

3. UNIX for Dummies Questions & Answers

UNIX Account getting Locked Everyday between same Time Frame

I am facing an Issue with a particular Unix Account ( ie a particular Userid) getting LOCKED everyday between 7:30am and 8:00am. The Password associated with this particular Account has been setup such that it should never Expire at all but it does LOCK the Account after more than 3 failed... (5 Replies)
Discussion started by: pchegoor
5 Replies

4. Shell Programming and Scripting

Check if file is locked otherwise gzip it

Dear community, I've a continuos tcpdump on redhat that close the dumped file every 100000 captured packets. To avoid disk full I would like to gzip the closed *.cap file. But how can I check if the file is currently opened by tcpdump and skip it from gzip? Thanks! EDIT: Just to post an... (9 Replies)
Discussion started by: Lord Spectre
9 Replies

5. UNIX for Dummies Questions & Answers

How do i list all locked account in linux?

Hi How do i list all locked account in my linux distributiion I have tried passwd -S -a but it seems to not working . My distribution details. # lsb_release -a LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: OracleVMserver... (3 Replies)
Discussion started by: pinga123
3 Replies

6. HP-UX

how to list locked users in hp-ux?

Actually.I have 2 questions to ask. 1. how to list locked account in hp-ux? 2.how to list locked account in linux(redhat)? I can use the command "passwd -S -username" to list a account who were locked . who knows how to list all locked accounts with one command. Thanks!! (5 Replies)
Discussion started by: robbiezr
5 Replies

7. UNIX for Dummies Questions & Answers

find locked files, print file path, unlock file

using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked how can I do this? I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like. Thanks! (0 Replies)
Discussion started by: alternapop
0 Replies

8. Shell Programming and Scripting

checking whether a file is locked

hi Guys, I just wondering how I can check and ensure a file is not locked by another process. I need to modify a file using sed but I need to ensure that is not being modified by another process at the same time. Thanks. Harby. (2 Replies)
Discussion started by: hariza
2 Replies

9. UNIX for Dummies Questions & Answers

list of active and locked OS accounts

Hello all I'm trying to generate a list of active and locked accounts at the end of every month...How would I know which account is active and which is locked or diabled ...I was looking at the /etc/passwd file but I was not sure how to differentiate between an active account and a locked... (4 Replies)
Discussion started by: luft
4 Replies

10. UNIX for Dummies Questions & Answers

How can a file be locked for a certain time?

I want to be able to lock a file for 60 minutes so that an automated monitoring program will not execute the script more that once an hour. I have never used a lock file but have heard that is what I need to use. Does anyone have any examples of how I would use this? lock 60 filename.ksh ---?... (6 Replies)
Discussion started by: darthur
6 Replies
Login or Register to Ask a Question