zoukankan      html  css  js  c++  java
  • find命令

    Usage: find [path...] [expression]

    expression may consist of: operators, options, tests, and actions:——表达式可以有operators, options, tests, and actions组成

    operators (decreasing precedence; -and is implicit where no others are given):
    !/-not
    -a/-and
    -o/-or

    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 #查找N分钟之内访问过的文件,N为负值表示查找以前的(access time)
    -anewer FILE
    -atime N #查找N天之内访问过的文件
    -cmin N #查找N分钟之内修改过的文件,N为负值表示查找以前的(change time)
    -cnewer FILE
    -ctime N
    -empty #查找空文件
    -false
    -fstype TYPE
    -gid N #查找group id等于N的文件,group id用id命令获取
    -group NAME
    -ilname PATTERN
    -iname PATTERN
    -inum N
    -iwholename PATTERN
    -iregex PATTERN
    -links N
    -lname PATTERN
    -mmin N #查找N分钟之内修改过的文件,N为负值表示查找以前的(modify time)
    -mtime N
    -name PATTERN # 查找匹配到的文件
    -newer FILE
    -nouser
    -nogroup
    -path PATTERN
    -perm [+-]MODE
    -regex PATTERN
    -wholename PATTERN
    -size N[bcwkMG] #按照文件大小进行查找,-N表示文件大小小于N,+N表示文件大小大于N
    -true
    -type [bcdpflsD]
    -uid N #查找user id等于N的文件,user id用id命令获取
    -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 ;

  • 相关阅读:
    require的特点
    require和load的不同之处
    关于“load”方法
    puts方法要点
    用类解释对象的由来
    以方法调用的原理解释Ruby中“puts ‘Hello‘”
    Ruby中方法的设计理念
    Ruby中puts,print,p的区别
    Ubuntu16.04安装MongoDB的Ruby驱动
    使用spring框架,用xml方式进行bean装配出现“The fully qualified name of the bean's class, except if it serves...”
  • 原文地址:https://www.cnblogs.com/wbz-blogs/p/8619261.html
Copyright © 2011-2022 走看看