zoukankan      html  css  js  c++  java
  • grep

     

    1.grep 或条件

    [root@node2 nginx]# ps -ef|grep -e nginx -e PID
    UID         PID   PPID  C STIME TTY          TIME CMD
    root       5399      1  0 04:40 ?        00:00:00 nginx: master process ./nginx
    nobody    11750   5399  0 05:49 ?        00:00:00 nginx: worker process
    root      11781  11696  0 06:16 pts/0    00:00:00 grep -e nginx -e PID
    [root@node2 nginx]# ps -aux|grep -e nginx -e %
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root       5399  0.0  0.0  23980  1324 ?        Ss   04:40   0:00 nginx: master process ./nginx
    nobody    11750  0.0  0.0  24400  1624 ?        S    05:49   0:00 nginx: worker process
    root      11783  0.0  0.0 103324   864 pts/0    S+   06:16   0:00 grep -e nginx -e %
    

      

    同时,ps -ef可以看父进程ID  PPID  以及完整的command命令 CMD

        ps -aux 可以看进程的CPU占用率和内存占用率

     2.grep 忽略大小写

    grep -i      i=ignore case

    3.查找包含“***” 的所有的 .xml 文件

    grep -R  --include“*。xml”’ “****”  ./

  • 相关阅读:
    svn-Subversion
    英语学习-2020年4月
    自动化-研究
    数据库-存储过程
    未来软件测试的发展趋势
    学习alex---人生导师
    自动化测试-----总结
    接口测试总结
    jmeter-接口测试项目
    接口测试jmeter
  • 原文地址:https://www.cnblogs.com/jycjy/p/7944664.html
Copyright © 2011-2022 走看看