Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how I cat to filter out information about Unix Domain Sockets from netstat output without grep?
Is there some option for command (I not found it in man of netstat).

Thank you for ahead.

share|improve this question
Why not use grep? – BloodPhilia Aug 25 '10 at 17:33
Because it remains header of the section (few lines above "unix" record set) and it is too long every time to write it, and it is neccessary to do alias for this on each server. – Rodnower Aug 25 '10 at 19:48


netstat -46
share|improve this answer
This is not solution. In netstat --inet (also with -a swithch) I don't get the following line: "tcp 0 0 ::ffff: ::ffff: ESTABLISHED". But I get it without --inet – Rodnower Aug 24 '10 at 17:46
Sorry, forgot about IPv6. Should work now – whitequark Aug 24 '10 at 18:28
No, acording to man, netstat do not get this parameters... May be we told about different releases. I speak about: net-tools 1.60 netstat 1.42 (2001-04-15) for Linux. So I think that there is no such option. The only way is to use grep command. It is possible to put alias for this in /etc/bashrc. I put this answer with all this comments like accepted. Thank you any way. – Rodnower Aug 24 '10 at 23:29
Strange. You can also try -A inet,inet6, or --inet --inet6. All of these options, including -46, are fully equivalent and work for me on netstat 1.42. Hope you'll fix anything that. – whitequark Aug 25 '10 at 6:30
Yes, it is works :) – Rodnower Aug 25 '10 at 7:09
up vote 0 down vote accepted
netstat -tulpn

-t tcp
-u udp
-l listenning
-p program name
-n use addresses rather then DNS names

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.