zoukankan      html  css  js  c++  java
  • linux查找文件利器

    查找文件

    比如:找nginx.conf配置文件

    locate nginx.conf
    /usr/local/etc/nginx/nginx.conf
    /usr/local/etc/nginx/nginx.conf.default

    如果提示  locate  命令找不到  就安装下 

    安装:yum  -y install mlocate
    
    安装完再尝试用locate定位内容,发现依然不好使,报了新的错误:
    locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
    
    更新库:updatedb

    查找进程相关

    ps aux|grep nginx

    ps -ef|grep nginx

    2者没有太大的差别。一个样其实

    查找nginx的启动的时候的配置文件

    /usr/local/opt/nginx/bin/nginx -t
    nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful

    测试可知,nginx的配置文件路径为:/usr/local/etc/nginx/nginx.conf 且调用有效。

  • 相关阅读:
    链表详解自带代码
    队列
    单词翻转
    表达式求值
    一元多项式
    循环链表
    学生成绩管理系统
    双向循环链表
    双向链表
    静态链表
  • 原文地址:https://www.cnblogs.com/coder-lzh/p/11278644.html
Copyright © 2011-2022 走看看