![](https://seccdn.libravatar.org/avatar/b4047644c59f2d63b88e9464c02743fd.jpg?s=120&d=mm&r=g)
Rob Verduijn <rob.verduijn@gmail.com> wrote:
2013/12/14 John Andersen <jsamyth@gmail.com>:
zypper ps
;-)
Zypper is open source, so you could dig into the code and see what it is doing.
Its probably fairly complex. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
So you are saying you don't know either. ;-)
I don't know if it's complex. And I don't know c. Just a bit of perl and scripting. So your suggestion to study the source is not really feasable. I know it's fast, I was just wondering what it queried to figure it out so fast.
Even google came up short on this one for me.
Rob
This used to be simple, but once the cutover to zypper, the old method stopped being reliable. Files with no directory entry but still open, can still be found, but there is a great wheat vs chaff problem. You can also attack it from the processes point of reference, by asking for the open files of each pid. But then you still have to toss out the temp files, and those with multiple pointers, etc. Zypper PS is not fool proof, I remembered finding at least one instance of it failing, when a package was installed in an unusual place. So short answer is, yeah I don't know. I do know that lsof > some-file followed by grepping that file gives different (and seemingly better) results than just lsof |grep. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org