I tried withlsof -F c somefileBut I getp1cinitp231cmountallp314cupstart-udev-brp317cudevdInstead of initmountall...Any way to get just the command?
List only commands with lsof
lsof
Man page says procces ID is always selected.depending on your need, you may use awk to filter out process lsof -F c somefile | awk '/^c/ { print substr($0,2)}' 