常用工具命令速查表

linux命令查询 https://wangchujiang.com/linux-command/hot.html

bash命令速查表 https://github.com/bitleef/awesome-cheatsheets/blob/master/languages/bash.sh

GDB命令速查表 https://github.com/bitleef/awesome-cheatsheets/blob/master/tools/gdb.txt

git命令速查表 https://github.com/bitleef/awesome-cheatsheets/blob/master/tools/git.txt

vim命令速查表 https://github.com/bitleef/awesome-cheatsheets/blob/master/tools/vim.txt

docker命令速查表 https://github.com/bitleef/awesome-cheatsheets/blob/master/tools/docker.sh

linux info https://blog.csdn.net/dengjin20104042056/article/details/95245508

#批量查询日志  批量查询多台机器日志

#grep单个字符
for i in `[获取ip列表]`;  do ssh $i "grep '[筛选信息]' [file]";  done;

#grep多个字符
grep [字符1] [file] | grep [字符2] | grep [字符3]

#grep 反向匹配
grep -v ‘字符串’
#匹配文件中不包含 MANPATH 的那一行:
cat manpath.config| grep -v 'MANPATH'

# 同时匹配多个关键字–或关系
grep -E "word1|word2|word3" file.txt
匹配 file.txt 中包含 word1 或 word2 或 word3 的行。
满足其中任意条件(word1、word2和word3之一)就会匹配。

# 同时匹配多个关键字–与关系
使用管道符连接多个 grep ,间接实现多个关键字的与关系匹配:

grep word1 file.txt | grep word2 |grep word3
必须同时满足三个条件(word1、word2和word3)才匹配。
posted @   bitleef  阅读(112)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
点击右上角即可分享
微信分享提示
主题色彩