Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match on full commandline, not just the binary name #301

Open
dyfrgi opened this issue Dec 5, 2023 · 0 comments
Open

Match on full commandline, not just the binary name #301

dyfrgi opened this issue Dec 5, 2023 · 0 comments

Comments

@dyfrgi
Copy link

dyfrgi commented Dec 5, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant