Thread View: cn.bbs.comp.lang.java
1 messages
1 total messages
Started by Chris
Tue, 03 Jan 2012 02:35
t
Author: Chris
Date: Tue, 03 Jan 2012 02:35
Date: Tue, 03 Jan 2012 02:35
184 lines
5618 bytes
5618 bytes
///////////////////////////////////////////
#lsof -Pnl +M -i4
//////////////////////////////////////////////
Lsof:�书������ʾ���ļ�����������˿ڡ�
����netstat :�����������Ե�չʾ�����������йص���ݺ���Ϣ�����ݡ�
����Lsof����ʾ��
�������������������������鿴IPv4�˿ڣ�
����# lsof -Pnl +M -i4
�������������������������鿴IPv6Э���µĶ˿���ʾ��
����# lsof -Pnl +M -i6
�������������
1
�����������Dz�������һ �¡���һ����command�������˳�����Ƶ��й���Ϣ����ע������ϸ�ڡ����磬�ڶ��е�gweather* ��������� NWS������(140.90.128.70)��ȡ����ı�����Ϣ����������������Ϣ�������������������������ǽ���һ�������������
����1. -P :���ѡ��Լ���������ļ��Ķ˿ںŵ��˿���Ƶ�ת����Լ��ת������ʹlsof���еø��һЩ���ڶ˿���ƵIJ��Ҳ�����Чʱ�����Ǻ����õġ�
����2. -n : ���ѡ��Լ���������ļ��Ķ˿ںŵ�������Ƶ�ת����Լ��ת������ʹlsof�����и��һЩ����������ƵIJ��Ҳ�����Чʱ����dz����á�
����3. -l :���ѡ��Լ�����û�ID�ŵ���¼���ת�����ڵ�¼��IJ��Ҳ���ȷ�����ʱ�����ѡ��ͺ����á�
����4. +M :��ѡ��֧�ֱ���TCP��UDP�˿�ӳ������ע�ᱨ�档
����5. -i4 :����ʾIPv4Э���µĶ˿ڡ�
����6. -i6 : ����ʾIPv6Э���µĶ˿ڡ�
����Netstaty�������
������������������
����# netstat -tulpn
����������
����# netstat -npl
�����뿴������:
����Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
����tcp 0 0 0.0.0.0:6881 0.0.0.0:* LISTEN 6908/python
����tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 5562/cupsd
����tcp 0 0 127.0.0.1:3128 0.0.0.0:* LISTEN 6278/(squid)
����tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5854/exim4
����udp 0 0 0.0.0.0:32769 0.0.0.0:* 6278/(squid)
����udp 0 0 0.0.0.0:3130 0.0.0.0:* 6278/(squid)
����udp 0 0 0.0.0.0:68 0.0.0.0:* 4583/dhclient3
����udp 0 0 0.0.0.0:6881 0.0.0.0:* 6908/python
������ע�⣬���һ������˹��ڳ�����ƺͶ˿ڵ���Ϣ����������ǽ���һ�¸�����ĺ��壺
����-t : ָ����ʾTCP�˿�
����-u : ָ����ʾUDP�˿�
����-l : ����ʾ��������(��ν���־���ʹӦ�ó����ܹ���д���շ�ͨѶЭ��(protocol)�����ϵij���)
����-p : ��ʾ��̱�ʶ��ͳ�����ƣ�ÿһ������/�˿ڶ�����һ������
����-n : ������DNS��ѯ(���Լ��ٲ���)
��������/etc/services�ļ�
����/etc/services��һ����ASCII�ļ���������ṩ�����������Ѻ��ı���ƣ�������Ĭ�Ϸ���Ķ˿ںź�Э�����͡�ÿһ���������Ҫ��������ļ��������Ķ˿ں�(��Э��)������Խ�����cat�����less��������鿴����ļ���
����$ cat /etc/services
����$ grep 110 /etc/services
����$ less /etc/services
--
����������
�����Ҧ��������ʲô=> ��¼������Ӧ�� http://apps.weibo.com/friendsec ���ѽ���->ta������->ta����ҳ
�ҵIJ��� http://cffile.sinaapp.com/
[1;37m�� ��Դ:�������ʵBBS http://bbs.tju.edu.cn [FROM: 202.113.13.188][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads