Unix delete locked file
Ask Question. Asked 13 years ago. Active 12 months ago. Viewed 37k times. Today I had the problem that I couldn't delete a folder because "it was busy". How can I find out which application to blame for that or can I just delete it with brute force? Improve this question. Xn0vv3r Xn0vv3r Add a comment. Deleting Files. Hi, I have been working with files in emacs and a file showed up in my directories called main.
However I cannot delete this main. Any suggestions? Deleting the files. Hi, I've to delete certain files older than X days from a Maintenance server.
I'm doing this using find. RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Connect and share knowledge within a single location that is structured and easy to search. Using flock , several processes can have a shared lock at the same time, or be waiting to acquire a write lock.
How do I get a list of these processes? That is, for a given file X, ideally to find the process id of each process which either holds, or is waiting for, a lock on the file. It would be a very good start though just to get a count of the number of processes waiting for a lock. Two possibilities: lsof my preference or lslk specifically for file locks :.
Output of lslk is self-expanatory but lsof puts the lock description in the "FD" column which is 10uW above. From the man page:. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Learn more. Browse pages. A t tachments 0 Page History People who can view. Jira links. Created by Henderson, Rob , last modified on Jan 06,
0コメント