zoukankan      html  css  js  c++  java
  • 【LINUX CLI】我的常用linux命令备忘录

    年纪大了 记不住命令了 常用LINUX备忘录

    1. netstat  

    netstat -tulnp

             -t tcp

             -u udp

             -l listen 仅侦听,而非活动已建立的连接

             -n 按编号而非名称显示主机和端口

             -p 显示端口号的本地进程

    -p, --program
    Show the PID and name of the program to which each socket belongs.

    -l, --listening
    Show only listening sockets. (These are omitted by default.)

    --numeric , -n
    Show numerical addresses instead of trying to determine symbolic host, port or user names.


    [root@namenode ~]# netstat -lnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 172.16.137.45:10033 0.0.0.0:* LISTEN 28758/java tcp 0 0 0.0.0.0:11060 0.0.0.0:* LISTEN 19864/java tcp 0 0 172.16.137.45:8020 0.0.0.0:* LISTEN 9584/java tcp 0 0 172.16.137.45:8022 0.0.0.0:* LISTEN 9584/java tcp 0 0 172.16.137.45:50070 0.0.0.0:* LISTEN 9584/java tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2961/sshd tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 28945/java tcp 0 0 127.0.0.1:19001 0.0.0.0:* LISTEN 14380/python tcp 0 0 172.16.137.45:31324 0.0.0.0:* LISTEN 19864/java tcp 0 0 0.0.0.0:8030 0.0.0.0:* LISTEN 28945/java tcp 0 0 0.0.0.0:8031 0.0.0.0:* LISTEN 28945/java tcp 0 0 0.0.0.0:8032 0.0.0.0:* LISTEN 28945/java tcp 0 0 0.0.0.0:8033 0.0.0.0:* LISTEN 28945/java tcp 0 0 172.16.137.45:58722 0.0.0.0:* LISTEN 19864/java tcp 0 0 172.16.137.45:10020 0.0.0.0:* LISTEN 28758/java tcp 0 0 172.16.137.45:9000 0.0.0.0:* LISTEN 14345/python tcp 0 0 172.16.137.45:50090 0.0.0.0:* LISTEN 9608/java tcp 0 0 172.16.137.45:19888 0.0.0.0:* LISTEN 28758/java tcp 0 0 :::22 :::* LISTEN 2961/sshd udp 0 0 172.16.137.45:123 0.0.0.0:* 16043/ntpd udp 0 0 10.180.137.45:123 0.0.0.0:* 16043/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 16043/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 16043/ntpd udp 0 0 fe80::250:56ff:fea2:62d3:123 :::* 16043/ntpd udp 0 0 fe80::250:56ff:fea2:5381:123 :::* 16043/ntpd udp 0 0 ::1:123 :::* 16043/ntpd udp 0 0 :::123 :::* 16043/ntpd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 73768 14380/python /var/run/cloudera-scm-agent/supervisor/supervisord.sock.14377 unix 2 [ ACC ] STREAM LISTENING 8343 1/init @/com/ubuntu/upstart

     2. tcpdump 抓包

    tcpdump -i eth1 -s 0 -w httptest.pcap host 10.180.139.198
    
    tcpdump -i eth1 -s 0 -w testplat.pcap host 10.180.184.41
    
    tcpdump -i eth1 -s 0 -w arpdebug.pcap
    
    tcpdump -i eth2 -s 0 -w reg0704.pcap host 10.180.134.26

     3. find

    [root@jenkins ~]# find / -name HTMLTestRunner.py 
    /opt/rh/python27/root/usr/lib/python2.7/site-packages/HTMLTestRunner.py
    /usr/lib/python2.6/site-packages/HTMLTestRunner.py
  • 相关阅读:
    使用 Promise.all 同时发起多个请求
    vite 开发 Cesium 程序最佳配置实践
    【linux学习】使用grep命令获取过滤的数据作为下个命令的入参
    记一次k8s depolyment失败处理
    powerdesigner导出excel数据字典
    vue 时间格式
    ASP.NET MVC4 跨域配置
    Win10系统中切换虚拟桌面的快捷键如何设置
    不顾一切最简NHinbernate配置并读写数据库
    Windows time_wait过多解决办法
  • 原文地址:https://www.cnblogs.com/AlexBai326/p/6179374.html
Copyright © 2011-2022 走看看