Loading

shell常用指令

systemd about

$ systemctl status clash.service
$ systemctl restart xxx
$ systemctl start xxx
$ systemctl enable xxx // 开机服务自启动
$ journalctl -u edgecore.service -xef

find file

$ find ./ -type f | fzf

read file

- Print the contents of a file to the standard output:
    cat file

- Concatenate several files into the target file:
    cat file1 file2 > target_file

- Append several files into the target file:
    cat file1 file2 >> target_file

- Number all output lines:
    cat -n file

- Display non-printable and whitespace characters (with `M-` prefix if non-ASCII):
    cat -v -t -e file

ssh + scp

$ scp -P6000 -r ./*  root@82.156.172.224:/root/Wet_thermometer/mappers-go/mappers/ble/device/
$ ssh -oPort=6000 root@82.156.172.224

Git

Git 命令常用大全

$ git add * && git commit -m "test v1.0" && git push
$ tig status

Go

$ GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro/go-zero/tools/goctl
$ go mod tidy
$ GOOS=linux CGO_ENABLED=0 GOARCH=arm go build -o blesh_lnx *.go
$ GO111MODULE=off CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o  ./build/$(BINARY_NAME)

ack

$ ack "kCBMsgId" -C

查看磁盘空间文件大小

$ du -sh *

查询指令常用方式

$ tldr xxx

查看进程 + 网口流量 + 网卡信息

$ iftop
$ htop
$ ifconfig
posted @ 2022-02-24 13:22  zhixlin  阅读(33)  评论(0编辑  收藏  举报