Report question

Question: How to check in command-line if a given file or directory is locked (used by any process)?