知行编程网知行编程网  2022-04-14 12:00 知行编程网 隐藏边栏 |   抢沙发  16 
文章评分 0 次,平均分 0.0

Linux 这些工具堪称神器!

作者 | int32bit   

链接 | http://t.cn/R1FKgdN


ag:比grep、ack更快的递归搜索文件内容。


Linux 这些工具堪称神器!



tig:字符模式下交互查看git项目,可以替代git命令。



Linux 这些工具堪称神器!



mycli:mysql客户端,支持语法高亮和命令补全,效果类似ipython,可以替代mysql命令。



Linux 这些工具堪称神器!



jq: json文件处理以及格式化显示,支持高亮,可以替换python -m json.tool。



Linux 这些工具堪称神器!



shellcheck:shell脚本静态检查工具,能够识别语法错误以及不规范的写法。



Linux 这些工具堪称神器!



fzf:命令行下模糊搜索工具,能够交互式智能搜索并选取文件或者内容,配合终端ctrl-r历史命令搜索简直完美。



Linux 这些工具堪称神器!



PathPicker(fpp): 在命令行输出中自动识别目录和文件,支持交互式,配合git非常有用。
运行以下命令:



<section style="padding: 6px;max-width: 100%;border-radius: 4px;font-size: 0.85em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);overflow-x: auto;white-space: nowrap;margin-left: 8px;margin-right: 8px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">git diff HEAD~8 <span class="" style="font-size: 15px;max-width: 100%;color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 84px;text-decoration-style: solid;text-decoration-color: rgb(92, 99, 112);font-style: italic;">--stat | fpp</span></span><span style="color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 84px;text-decoration-style: solid;text-decoration-color: rgb(92, 99, 112);font-style: italic;max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span></section>




Linux 这些工具堪称神器!



htop: 提供更美观、更方便的进程监控工具,替代top命令。



Linux 这些工具堪称神器!



glances:更强大的 htop / top 代替者。
htop 代替 top,glances 代替 htop:



Linux 这些工具堪称神器!



信息比 htop 丰富了不少,更全了,对吧?除了命令行查看外,glances 还提供页面服务,让你从页面上随时查看某服务器的状态。


axel:多线程下载工具,下载文件时可以替代curl、wget。



<section style="padding: 6px;max-width: 100%;border-radius: 4px;font-size: 0.85em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);overflow-x: auto;white-space: nowrap;margin-left: 8px;margin-right: 8px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">axel -n <span class="" style="font-size: 15px;max-width: 100%;color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration-style: solid;text-decoration-color: rgb(209, 154, 102);">20</span> <span class="" style="font-size: 15px;max-width: 100%;color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 35px;text-decoration-style: solid;text-decoration-color: rgb(97, 174, 238);">http:</span>/<span class="" style="font-size: 15px;max-width: 100%;color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 182px;text-decoration-style: solid;text-decoration-color: rgb(152, 195, 121);">/centos.ustc.edu.cn/centos</span><span class="" style="font-size: 15px;max-width: 100%;color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 49px;text-decoration-style: solid;text-decoration-color: rgb(152, 195, 121);">/7/isos</span><span class="" style="font-size: 15px;max-width: 100%;color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 56px;text-decoration-style: solid;text-decoration-color: rgb(152, 195, 121);">/x86_64/</span>CentOS-<span class="" style="font-size: 15px;max-width: 100%;color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration-style: solid;text-decoration-color: rgb(209, 154, 102);">7</span>-x86_64-Minimal-<span class="" style="font-size: 15px;max-width: 100%;color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 28px;text-decoration-style: solid;text-decoration-color: rgb(209, 154, 102);">1511</span>.iso</span></section>


<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  />


Linux 这些工具堪称神器!



sz/rz:交互式文件传输,在多重跳板机下传输文件非常好用,不用一级一级传输。


cloc:代码统计工具,能够统计代码的空行数、注释行、编程语言。



Linux 这些工具堪称神器!


tmux:终端复用工具,替代screen、nohup。



Linux 这些工具堪称神器!



script/scriptreplay:  终端会话录制。



<section style="padding: 6px;max-width: 100%;border-radius: 4px;font-size: 0.85em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);overflow-x: auto;white-space: nowrap;margin-left: 8px;margin-right: 8px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span class="" style="font-size: 15px;max-width: 100%;color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration-style: solid;text-decoration-color: rgb(97, 174, 238);">#</span> 录制</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">script -t 2>time.txt session.typescript</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span class="" style="font-size: 15px;max-width: 100%;color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration-style: solid;text-decoration-color: rgb(97, 174, 238);">#</span> your commands</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span class="" style="font-size: 15px;max-width: 100%;color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration-style: solid;text-decoration-color: rgb(97, 174, 238);">#</span> 录制结束</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">exit</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span class="" style="font-size: 15px;max-width: 100%;color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration-style: solid;text-decoration-color: rgb(97, 174, 238);">#</span> 回放</span><br mpa-from-tpl="t" style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  /><span style="max-width: 100%;font-size: 15px;box-sizing: border-box !important;overflow-wrap: break-word !important;">scriptreplay -t time.txt session.typescript</span></section>


<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"  />
multitail:多重  tail。
通常你不止一个日志文件要监控,怎么办?终端软件里开多个 tab 太占地方,可以试试这个工具:


Linux 这些工具堪称神器!


童鞋们,你用过哪个工具?
—完—
为您推荐
最新微软研究院书籍《数据科学基础》分享

从6万用户评论中,选出23门全世界最好的CS免费课

这位90后学霸,即将任教麻省理工
南京大学「自然指数」超越清华北大,位列全国高校第一、世界第七,突显学术实力
【微软】AI-神经网络基本原理简明教程

本篇文章来源于: 深度学习这件小事

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

知行编程网
知行编程网 关注:1    粉丝:1
这个人很懒,什么都没写

发表评论

表情 格式 链接 私密 签到
扫一扫二维码分享