Linux command
lslocks 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
lslocks
Example
lslocks -o PID,COMMAND,PATH
Raw
lslocks --raw --noheadings
Example
lslocks --pid [pid]
Example
lslocks --json
说明
lslocks lists information about all file locks held on the local system. It shows advisory and mandatory locks, the holding process, and lock details.
参数
- -o, --output COLUMNS
- Specify output columns
- -p, --pid PID
- Show locks for specific process
- -J, --json
- JSON output format
- -r, --raw
- Raw output without formatting
- -n, --noheadings
- Suppress column headers
- -u, --notruncate
- Don't truncate output
FAQ
What is the lslocks command used for?
lslocks lists information about all file locks held on the local system. It shows advisory and mandatory locks, the holding process, and lock details.
How do I run a basic lslocks example?
Run `lslocks` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --output COLUMNS do in lslocks?
Specify output columns