linux 查找命令find
find 命令用来在指定目录下查找文件。任何位于参数之前的字符串都将被视为欲查找的目录名。 如果使用该命令时,不设置任何参数,则将在当前目录下查找子目录与文件。并且将查找到的子目录和文件全部进行显示。 find 默认路径为当前目录,默认表达式 EXPRESSIONS 为-print,即 find ./ -print EXPRESSIONS:表达式可能由下列成份组成: 操作符 、选项、 测试表达式 以及 动作, 选项这里不做介绍 多条件查找,操作符介绍 // 非 ! expr True if expr is false. -not expr Same as ! expr, but not POSIX compliant. // 同时符合表达式1、表达式2的结果集 expr1 expr2 implied "and"; expr2 is not evaluated if expr1 is false. expr1 -a expr2 Same as expr1 expr2. expr1 -and expr2 Same as expr1 expr2, but not POSIX compliant. // 符合表达式1或者符合表达式2的结果集 expr1 -o expr2 implied "or"; expr2 is not evaluated if expr1 is true. expr1