How to list regular files opened by a process by name

example.sh
lsof -c minio | grep -E 'REG'

This command lists all regular files opened by processes whose names contain “minio”. The lsof command lists open files, the -c minio option filters for processes with names matching “minio”, and the grep -E 'REG' filters the output to show only regular files.


Check out similar posts by category: Linux