中文 | 指令 | 说明 |
查看当前目录磁盘使用情况 | du -h --max-depth=1 | |
统计文本行数(统计换行符数量) | cat test.txt | wc -l | 支持*匹配 |
统计文本行数 | awk '{print NR}' test.txt|tail -n1 | 支持*匹配 |
vim显示行号 | :set number | |
查看第n行到m行的内容 | sed -n '100,105p' filename | 查看100行到105行的内容 |
根据进程号查看目录 | readlink -f /proc/974/exe lsof -p 10880 | 其中974和10880为进程号 |

Linux Shell指令记录

暂无评论