linux命令行神器
ddatsh
一些 linux 命令行神器
htop
ncdu
查文件夹大小
一层层的 du, cd,整个过程就像刨垃圾堆一样的恶心
dstat
dstat -cdlmnpsy
dstat -g -l -m -s --top-mem
dstat -c -y -l --proc-count --top-cpu
dstat --top-oom
nethogs
每个进程流量
m: 修改网速单位
r: 按照流量排序
s: 按照发送流量排序
q: 退出
iotop
列正在写的进程
Total DISK READ : 0.00 B/s | Total DISK WRITE : 39.48 K/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
PID PRIO USER DISK READ DISK WRITE> SWAPIN IO COMMAND
12345 be/4 root 0.00 B 124.00 K 0.00 % 0.00 % python server.py
12346 be/4 root 0.00 B 100.00 K 0.00 % 0.00 % python server.py
iotop -o -P -a
-o, --only
Only show processes or threads actually doing I/O, instead of showing all processes or threads.
This can be dynamically toggled by pressing o.
-P, --processes
Only show processes. Normally iotop shows all threads.
-a, --accumulated
Show accumulated I/O instead of bandwidth. In this mode, iotop shows the amount of I/O processes
have done since iotop started.
lsof
列正在写的文件
lsof | grep 'w\s*REG'
ag
比grep、ack更快的递归搜索文件内容
fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
or upgrade
cd ~/.fzf && git pull && ./install
http://einverne.github.io/post/2019/08/fzf-usage.html
fuck
https://github.com/nvbn/thefuck
每次命令行打错了以后,打一句fuck就会自动更正命令。比如apt-get打成了aptget。fuck以后自动变成apt-get。但还是没加sudo。再fuck,成功!
又比如git branch打成了git brnch。fuck!更正成git branch
又比如python打成了puthon。fuck!一秒变python
而且关键是每次打命令和内心os完全一致,有种人机合一的快感。fuck!