Apps built using the Electron framework may be packaged so that they have a commandline that looks something like /usr/bin/electron --app-path=/usr/local/appname/resources/app. Some other apps may also have a binary name that is different from the app name, e.g. /usr/bin/python or another interpreter. I would like to be able to match these sorts of apps directly with lsof.
As a workaround, it's possible to create a commandline by doing something along these lines: lsof -p $(ps aux | grep -i logseq | awk '{print $2}' | tr '\n' ','). Or on a system with pgrep available a shorter version is possible: lsof -p $(pgrep -f -d, -i logseq).
Apps built using the Electron framework may be packaged so that they have a commandline that looks something like
/usr/bin/electron --app-path=/usr/local/appname/resources/app
. Some other apps may also have a binary name that is different from the app name, e.g./usr/bin/python
or another interpreter. I would like to be able to match these sorts of apps directly with lsof.As a workaround, it's possible to create a commandline by doing something along these lines:
lsof -p $(ps aux | grep -i logseq | awk '{print $2}' | tr '\n' ',')
. Or on a system with pgrep available a shorter version is possible:lsof -p $(pgrep -f -d, -i logseq)
.