View previous topic :: View next topic |
Author |
Message |
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Fri Apr 19, 2013 3:16 pm Post subject: find locked files - lslk? |
|
|
Apparently there's a utility - lslk - to display locked files, but it isn't in portage. Is there a better and/or alternate way to do this?
Thanks,
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Fri Apr 19, 2013 10:16 pm Post subject: |
|
|
What do you need this for? "Locked" files aren't really locked, as Linux uses advisory locking, not mandatory. In other words, the lock will only matter if another program tries to lock the file, which is not normally done. You can delete/modify/whatever the file without waiting for it to be unlocked.
Having said that, to have a lock on a file, the process must have the file open, so lsof (which lists open files) could tell you what you're looking for, provided you know either the program locking the files, or the files that it's locking.
Edit: Apparently lsof can even tell you about lock information on an fd, so there you go. _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|