![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux基础
嘟嘟富贵儿
这个作者很懒,什么都没留下…
展开
-
Linux 学习之常用命令 grep
grep -i 'HELLO' test.txt --在test.txt 找到包含"HELLO"字符的行内容(不区分大小写,即包含"Hello""hello""HEllo"等均能被找出)grep -Cx 'hello' test.txt --查找'hello'及'hello'之前x行以及hello之后x行的行。grep -Bx 'hello' test.txt --查找'hello' 及hello之前x行的行。-E 使用ERE.相当于egrep。原创 2024-01-16 15:08:03 · 431 阅读 · 1 评论 -
Linux 学习之常用命令 ps
b. 可与 |sort 组合,方便查看固定顺序数量的数据,例如:ps -aux | sort -nr 3 | head -10。1、ps [选项参数] | grep 根据进程名查询,显示符合包含进程名称条件的进程信息。2、ps [选项参数] | more -[数量] 查询的进程过多,无法一页展示完全时,可用此命令查看。PPID:该进程的父级进程ID,如果一个程序的父级进程找不到,该程序的进程被称为僵尸进程。4、ps [选项参数] | head -[数量]原创 2023-12-18 13:34:06 · 451 阅读 · 1 评论