technologies_to_study

  • centOS

    • rmp
      [root@196 ~]# rpm -ql squid | grep ncsa_auth
      /usr/lib64/squid/basic_ncsa_auth
      /usr/share/man/man8/basic_ncsa_auth.8.gz
    • yum
  • dpkg

  • less

    直接定位到第100行

    less +100g xx.log

    定位到最后一行

    less +GG xx.log

    定位到第100个字节的位置

    less +100P xx.log

    直接定位到50%的位置

    less +100p xx.log

  • systemctl restart squid

  • service
  • iptables
    [root@196 ~]# netstat -aultnp
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:33890 0.0.0.0: LISTEN 17693/sshd
    tcp 0 0 127.0.0.1:25 0.0.0.0:
    LISTEN 1952/master
    tcp 0 36 192.168.71.48:33890 192.168.71.254:43185 ESTABLISHED 64429/sshd: root@pt
    tcp6 0 0 :::33890 ::: LISTEN 17693/sshd
    tcp6 0 0 :::8889 :::
    LISTEN 63045/(squid-1)
    tcp6 0 0 ::1:25 ::: LISTEN 1952/master
    udp 0 0 0.0.0.0:45639 0.0.0.0:
    63045/(squid-1)
    udp6 0 0 :::47716 :::* 63045/(squid-1)
  • curl
    使用有认证的网络代理
    $ curl -x chengsu:Chengsu123@222.188.250.11:8889 ip.cn
    当前 IP:222.188.250.11 来自:江苏省常州市 电信
  • ifconfig

  • scp
    复制远程文件到本地
    scp -P 20095 root@58.216.235.22:/etc/squid/squid.conf ./
    复制本地文件到远程服务器
    scp -P 20095 /Users/zhanglibin/myblog/source/_drafts/StockAnalysis.md root@58.216.235.22:/root/bin