• 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 ;

  • 相关阅读:
    获取指定<文字行数>的<高度>是多少 TextKit
    JS 与 OC 交互
    PHP-note
    MySQL函数
    freeSWITCH之多平台测试通信
    freeSWITCH之安装
    PHP面向对象
    MySQL Optimization 优化原理
    理解常量指针与指针常量?
    InterView之PHP(2)
  • 原文地址:https://www.cnblogs.com/wbz-blogs/p/8619261.html
Copyright © 2020-2023  润新知