首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >提升工作效率的Linux命令

提升工作效率的Linux命令

作者头像
iginkgo18
发布2022-05-09 15:59:26
7270
发布2022-05-09 15:59:26
举报
文章被收录于专栏:devops_k8sdevops_k8s

ag

比grep,ack更快的递归搜索文件内容

[root@rabbitmq-2 html]# ag 'redis'
redis_pass.txt
1:#redis缓存ip地址和端口
2:spring.redis.host = 10.10.10.1
3:spring.redis.port=16379
4:spring.redis.password=123456

tig

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

mycli

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

 mkdir ~/.pip/
 cat > ~/.pip/pip.conf <<EOF
 [global]
 index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
EOF
   

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0b3.tgz
tar -xvf Python-3.8.0b3.tgz
cd Python-3.8.0b3
./configure --prefix=/app/python/python3.8
make & make install
ln -s /app/python/python3.8/bin/python3.8 /usr/bin/python3.8
ln -s /app/python/python3.8/bin/pip3.8 /usr/bin/pip3.8
 pip3.8 install mycli


pip3.8 install mycli
systemctl start mariadb
mycli

vim /usr/bin/mycli
修改前 #!/usr/bin/python2
修改后 #!/usr/bin/python3.8

jq

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

shellcheck

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

fzf

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

PathPicker(fpp)

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

git diff HEAD~8 --stat | fpp

htop

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

glances

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

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

axel

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

axel -n 20 http://centos.ustc.edu.cn/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso

rz/sz

交互式文件传输,在多重跳板机下传输文件非常好用,不用一级一级传输 ​

cloc

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

[root@rabbitmq-2 html]# cloc ecology.sql 
       1 text file.
       1 unique file.                              
       0 files ignored.

github.com/AlDanial/cloc v 1.70  T=0.18 s (5.5 files/s, 110621.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
SQL                              1             74            221          19878
-------------------------------------------------------------------------------

script/scriptreplay

终端会话录制

# 录制
script -t 2>time.txt session.typescript
# your commands
# 录制结束
exit
# 回放
scriptreplay -t time.txt session.typescript

11

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-29,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • ag
  • tig
  • mycli
  • jq
  • shellcheck
  • fzf
  • PathPicker(fpp)
  • htop
  • glances
  • axel
  • rz/sz
  • cloc
  • script/scriptreplay
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档