zoukankan      html  css  js  c++  java
  • linux find

    find / -name nginx.conf

    在根目录下寻找nginx.conf 文件

    find -help

    [root@iZ255m2u8usZ ~]# find -help
    Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
    
    default path is the current directory; default expression is -print
    expression may consist of: operators, options, tests, and actions:
    
    operators (decreasing precedence; -and is implicit where no others are given):
          ( EXPR )   ! EXPR   -not EXPR   EXPR1 -a EXPR2   EXPR1 -and EXPR2
          EXPR1 -o EXPR2   EXPR1 -or EXPR2   EXPR1 , EXPR2
    
    positional options (always true): -daystart -follow -regextype
    
    normal options (always true, specified before other expressions):
          -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf
          --version -xdev -ignore_readdir_race -noignore_readdir_race
    
    tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N
          -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME
          -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN
          -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE
          -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN
          -readable -writable -executable
          -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N
          -used N -user NAME -xtype [bcdpfls]
          -context CONTEXT
    
    
    actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print 
          -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit
          -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;
          -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;
    
    Report (and track progress on fixing) bugs via the findutils bug-reporting
    page at http://savannah.gnu.org/ or, if you have no web access, by sending
    email to <bug-findutils@gnu.org>.

    举例:

    find / -name java

    find [path...] [expression]

    find [path...] -name [PATTERN]

    [root@iZ255m2u8usZ ~]# find / -name java
    /usr/share/swig/1.3.40/java
    /usr/share/java
    /usr/share/doc/db4-devel-4.7.25/ref/java
    /usr/share/doc/db4-devel-4.7.25/java
    /usr/local/jdk1.7.0_79/jre/bin/java
    /usr/local/jdk1.7.0_79/bin/java
    /etc/pki/java
    /etc/pki/ca-trust/extracted/java
  • 相关阅读:
    linux kill命令以及 信号
    rhel7 系统服务——unit(单元)
    redis集群在线迁移
    二、主目录 Makefile 分析(3)
    二、主目录 Makefile 分析(2)
    二、主目录 Makefile 分析(1)
    一、文档目录分析
    Linux下解压缩
    设备树
    轮询
  • 原文地址:https://www.cnblogs.com/zno2/p/5729338.html
Copyright © 2011-2022 走看看