Sample Header Ad - 728x90

Can I use ss and filter on PID and FD?

0 votes
1 answer
708 views
I'd like to be able to run ss and filter on PID=$(pgrep emacs) and FDs=(5u|6u|8u). Does ss support filtering on either (or both) of these? Or is the best option to compose with grep? I'm currently using lsof, but I'd prefer to use ss:
lsof -p $(pgrep emacs) | rg '\b(5|6|8)u\b'
Asked by wpcarro (101 rep)
Nov 5, 2021, 07:44 PM
Last activity: Nov 5, 2021, 07:52 PM