Skip to content
Advertisement

How to exclude from `lsof` output the libraries?

I want to print in a log with the help of lsof the information about opened resources but I don’t want the customer to see what libraries are used. I browsed through the lsof man page but I cannot get a hold of how I can exclude only the libraries from the output. Is there an easy method to do this?

Advertisement

Answer

you can use sed, awk, cut for parsing output of lsof, show only those lines, which doesn’t have Lnn and ltx in their 4th field.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement