Linux工具
写在前面
Linux 上一些常用的工具。
例如:可以自动补全的 mysql 工具mycli
,交互式搜索的fzf
,代码统计工具cloc
…
mycli
mysql 客户端,支持语法高亮和命令补全,运行在 Terminal 上。
fzf
命令行下模糊搜索工具,交互式智能搜索并选取文件或内容。
cloc
代码统计工具
ccache
高速 C/C++编译缓存工具,提高编译速度。
gcc foo.c
ccache gcc foo.c
tmux
终端复用
tldr
简略的 man 文档
需要额外配置颜色输出
文件:~/.tldrrc
{
"themes": {
"my": {
"commandName": "bold, cyan",
"mainDescription": "underline",
"exampleDescription": "yellow",
"exampleCode": "red",
"exampleToken": "dim"
}
},
"theme": "my"
}
ranger
Terminal 上的文件系统。无桌面环境也能使用。
cpupower
限制 CPU 功率,降低功耗
查看支持的调度器:
cpupower frequency-info
analyzing CPU 5:
driver: intel_pstate
CPUs which run at the same hardware frequency: 5
CPUs which need to have their frequency coordinated by software: 5
maximum transition latency: Cannot determine or is not supported.
hardware limits: 800 MHz - 4.00 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 800 MHz and 4.00 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 3.07 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
从available cpufreq governors
获取两种模式performance
和powersave
限制最大频率(1.2GHz):
sudo cpupower frequency-set -u 1200000
comment:
- Valine
- LiveRe
- ChangYan