目录

繁琐的知识点记录

目录
  1. 查看apt install的一个包里面提供的内容

    bash

    dpkg -L curl
  2. docker build使用代理

bash

   docker compose build --build-arg http_proxy=http://192.168.1.32:7890 --build-arg https_proxy=http://192.168.1.32:7890

通过设置环境变量: docker-compose.yaml

text

build:
  context: .
args:
  - http_proxy=http://proxy.com
  - https_proxy=http://proxy.com
  1. 高效率快速压缩

    bash

    sudo apt-get install pigz
    tar cf - data | pigz -9 > file.tar.gz
  2. go的交叉编译

bash

   GOOS=darwin GOARCH=amd64 go build -o myprogram
  1. conda更新

bash

conda update -n base -c defaults conda
  1. linux路由表相关

bash

##  rui @ nisl61 in ~ [9:30:15]
$ ip route show
default via 10.176.22.1 dev eno1 proto static
10.176.22.0/24 dev eno1 proto kernel scope link src 10.176.22.61
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
198.18.0.0/30 dev Meta proto kernel scope link src 198.18.0.1
(base)
##  rui @ nisl61 in ~ [9:30:21]
$ ip rule
0:	from all lookup local
9000:	from all to 198.18.0.0/30 lookup 2022
9001:	from all ipproto icmp goto 9010
9002:	not from all dport 53 lookup main suppress_prefixlength 0
9002:	not from all iif lo lookup 2022
9002:	from 0.0.0.0 iif lo lookup 2022
9002:	from 198.18.0.0/30 iif lo lookup 2022
9010:	from all nop
32766:	from all lookup main
32767:	from all lookup default
(base)
##  rui @ nisl61 in ~ [9:30:28]
$ ip route show table 2022
0.0.0.0/5 dev Meta
8.0.0.0/7 dev Meta
11.0.0.0/8 dev Meta
12.0.0.0/6 dev Meta
16.0.0.0/4 dev Meta
32.0.0.0/3 dev Meta
64.0.0.0/2 dev Meta
128.0.0.0/1 dev Meta
(base)
##  rui @ nisl61 in ~ [9:30:32]
$ ip route show table local
local 10.176.22.61 dev eno1 proto kernel scope host src 10.176.22.61
broadcast 10.176.22.255 dev eno1 proto kernel scope link src 10.176.22.61
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
local 172.17.0.1 dev docker0 proto kernel scope host src 172.17.0.1
broadcast 172.17.255.255 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
local 198.18.0.1 dev Meta proto kernel scope host src 198.18.0.1
broadcast 198.18.0.3 dev Meta proto kernel scope link src 198.18.0.1
(base)
##  rui @ nisl61 in ~ [9:30:35]
$ ip route show table main
default via 10.176.22.1 dev eno1 proto static
10.176.22.0/24 dev eno1 proto kernel scope link src 10.176.22.61
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
198.18.0.0/30 dev Meta proto kernel scope link src 198.18.0.1
(base)
##  rui @ nisl61 in ~ [9:30:38]
$