Print this page
12328 FNMPERIOD makes little sense for find -path

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/find.1
          +++ new/usr/src/man/man1/find.1
↓ open down ↓ 37 lines elided ↑ open up ↑
  38   38  .\" If applicable, add the following below this CDDL HEADER, with the
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright 1989 AT&T
  44   44  .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
  45   45  .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
  46   46  .\" Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  47   47  .\" Copyright (c) 2013 Andrew Stormont.  All rights reserved.
       48 +.\" Copyright 2020 Joyent, Inc.
  48   49  .\"
  49      -.TH FIND 1 "Sep 5, 2011"
       50 +.TH FIND 1 "Feb 20, 2020"
  50   51  .SH NAME
  51   52  find \- find files
  52   53  .SH SYNOPSIS
  53      -.LP
  54   54  .nf
  55   55  \fB/usr/bin/find\fR [\fB-E\fR] [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
  56   56  .fi
  57   57  
  58   58  .LP
  59   59  .nf
  60   60  \fB/usr/xpg4/bin/find\fR [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
  61   61  .fi
  62   62  
  63   63  .SH DESCRIPTION
  64      -.LP
  65   64  The \fBfind\fR utility recursively descends the directory hierarchy for each
  66   65  \fIpath\fR seeking files that match a Boolean \fIexpression\fR written in the
  67   66  primaries specified below.
  68   67  .sp
  69   68  .LP
  70   69  \fBfind\fR is able to descend to arbitrary depths in a file hierarchy and does
  71   70  not fail due to path length limitations (unless a \fIpath\fR operand specified
  72   71  by the application exceeds \fIPATH_MAX\fR requirements).
  73   72  .sp
  74   73  .LP
  75   74  \fBfind\fR detects infinite loops; that is, entering a previously visited
  76   75  directory that is an ancestor of the last file encountered.
  77   76  .SH OPTIONS
  78      -.LP
  79   77  The following options are supported:
  80   78  .sp
  81   79  .ne 2
  82   80  .na
  83   81  \fB\fB-E\fR\fR
  84   82  .ad
  85   83  .RS 6n
  86   84  Interpret regular expressions followed by \fB-regex\fR and \fB-iregex\fR
  87   85  primaries as extended regular expressions.
  88   86  .RE
↓ open down ↓ 21 lines elided ↑ open up ↑
 110  108  be those of the file referenced by the link, and not the link itself. See
 111  109  \fBNOTES\fR.
 112  110  .RE
 113  111  
 114  112  .sp
 115  113  .LP
 116  114  Specifying more than one of the mutually-exclusive options \fB-H\fR and
 117  115  \fB-L\fR is not considered an error. The last option specified determines the
 118  116  behavior of the utility.
 119  117  .SH OPERANDS
 120      -.LP
 121  118  The following operands are supported:
 122  119  .sp
 123  120  .ne 2
 124  121  .na
 125  122  \fB\fIpath\fR\fR
 126  123  .ad
 127  124  .RS 14n
 128  125  A pathname of a starting point in the directory hierarchy.
 129  126  .RE
 130  127  
↓ open down ↓ 31 lines elided ↑ open up ↑
 162  159  .na
 163  160  \fB-\fIn\fR\fR
 164  161  .ad
 165  162  .RS 6n
 166  163  less than \fIn\fR
 167  164  .RE
 168  165  
 169  166  .RE
 170  167  
 171  168  .SS "Expressions"
 172      -.LP
 173  169  Valid expressions are:
 174  170  .sp
 175  171  .ne 2
 176  172  .na
 177  173  \fB\fB-acl\fR\fR
 178  174  .ad
 179  175  .RS 17n
 180  176  True if the file have additional ACLs defined.
 181  177  .RE
 182  178  
↓ open down ↓ 359 lines elided ↑ open up ↑
 542  538  Like \fB-exec\fR, except that the generated command line is printed with a
 543  539  question mark first, and is executed only if the response is affirmative.
 544  540  .RE
 545  541  
 546  542  .sp
 547  543  .ne 2
 548  544  .na
 549  545  \fB\fB-path\fR\fR
 550  546  .ad
 551  547  .RS 17n
 552      -Like \fB-name\fR, but matches the entire file path and not just basename.
      548 +Like \fB-name\fR, but matches the entire file path and not just basename, and
      549 +without any special treatment of leading periods.
 553  550  .RE
 554  551  
 555  552  .sp
 556  553  .ne 2
 557  554  .na
 558  555  \fB\fB-perm\fR [\fB-\fR]\fImode\fR\fR
 559  556  .ad
 560  557  .RS 17n
 561  558  The \fImode\fR argument is used to represent file mode bits. It is identical in
 562  559  format to the symbolic mode operand, \fIsymbolic_mode_list\fR, described in
↓ open down ↓ 147 lines elided ↑ open up ↑
 710  707  .sp
 711  708  .ne 2
 712  709  .na
 713  710  \fB\fB-xattr\fR\fR
 714  711  .ad
 715  712  .RS 17n
 716  713  True if the file has extended attributes.
 717  714  .RE
 718  715  
 719  716  .SS "Complex Expressions"
 720      -.LP
 721  717  The primaries can be combined using the following operators (in order of
 722  718  decreasing precedence):
 723  719  .sp
 724  720  .ne 2
 725  721  .na
 726  722  \fB1)\fB(\fR\fIexpression\fR\fB)\fR\fR
 727  723  .ad
 728  724  .sp .6
 729  725  .RS 4n
 730  726  True if the parenthesized expression is true (parentheses are special to the
↓ open down ↓ 45 lines elided ↑ open up ↑
 776  772  effectively replaced by:
 777  773  .sp
 778  774  .LP
 779  775  (\fIspecified\fR) \fB-print\fR
 780  776  .sp
 781  777  .LP
 782  778  The \fB-user\fR, \fB-group\fR, and \fB-newer\fR primaries each evaluate their
 783  779  respective arguments only once. Invocation of \fIcommand\fR specified by
 784  780  \fB-exec\fR or \fB-ok\fR does not affect subsequent primaries on the same file.
 785  781  .SH USAGE
 786      -.LP
 787  782  See \fBlargefile\fR(5) for the description of the behavior of \fBfind\fR when
 788  783  encountering files greater than or equal to 2 Gbyte (2^31 bytes).
 789  784  .SH EXAMPLES
 790      -.LP
 791  785  \fBExample 1 \fRWriting Out the Hierarchy Directory
 792  786  .sp
 793  787  .LP
 794  788  The following commands are equivalent:
 795  789  
 796  790  .sp
 797  791  .in +2
 798  792  .nf
 799  793  example% \fBfind .\fR
 800  794  example% \fBfind . -print\fR
↓ open down ↓ 149 lines elided ↑ open up ↑
 950  944  Attributes
 951  945  .sp
 952  946  .in +2
 953  947  .nf
 954  948  example% \fBfind . -xattr\fR
 955  949  .fi
 956  950  .in -2
 957  951  .sp
 958  952  
 959  953  .SH ENVIRONMENT VARIABLES
 960      -.LP
 961  954  See \fBenviron\fR(5) for descriptions of the following environment variables
 962  955  that affect the execution of \fBfind\fR: \fBLANG\fR, \fBLC_ALL\fR,
 963  956  \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 964  957  .sp
 965  958  .ne 2
 966  959  .na
 967  960  \fB\fBPATH\fR\fR
 968  961  .ad
 969  962  .RS 8n
 970  963  Determine the location of the \fIutility_name\fR for the \fB-exec\fR and
↓ open down ↓ 4 lines elided ↑ open up ↑
 975  968  .LP
 976  969  Affirmative responses are processed using the extended regular expression
 977  970  defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
 978  971  user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
 979  972  the behavior of ranges, equivalence classes, and multi-character collating
 980  973  elements used in the expression defined for \fByesexpr\fR. The locale specified
 981  974  in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
 982  975  bytes of text data a characters, the behavior of character classes used in the
 983  976  expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
 984  977  .SH EXIT STATUS
 985      -.LP
 986  978  The following exit values are returned:
 987  979  .sp
 988  980  .ne 2
 989  981  .na
 990  982  \fB\fB0\fR\fR
 991  983  .ad
 992  984  .RS 6n
 993  985  All \fIpath\fR operands were traversed successfully.
 994  986  .RE
 995  987  
↓ open down ↓ 27 lines elided ↑ open up ↑
1023 1015  .sp
1024 1016  .ne 2
1025 1017  .na
1026 1018  \fB\fB/etc/dfs/fstypes\fR\fR
1027 1019  .ad
1028 1020  .RS 20n
1029 1021  File that registers distributed file system packages
1030 1022  .RE
1031 1023  
1032 1024  .SH ATTRIBUTES
1033      -.LP
1034 1025  See \fBattributes\fR(5) for descriptions of the following attributes:
1035 1026  .sp
1036 1027  
1037 1028  .sp
1038 1029  .TS
1039 1030  box;
1040 1031  c | c
1041 1032  l | l .
1042 1033  ATTRIBUTE TYPE  ATTRIBUTE VALUE
1043 1034  _
1044 1035  CSI     Enabled
1045 1036  _
1046 1037  Interface Stability     Committed
1047 1038  _
1048 1039  Standard        See \fBstandards\fR(5).
1049 1040  .TE
1050 1041  
1051 1042  .SH SEE ALSO
1052      -.LP
1053 1043  \fBchmod\fR(1), \fBcpio\fR(1), \fBsh\fR(1), \fBtest\fR(1), \fBls\fR(1B),
1054 1044  \fBacl\fR(5), \fBregex\fR(5), \fBstat\fR(2), \fBumask\fR(2),
1055 1045  \fBattributes\fR(5), \fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5),
1056 1046  \fBlocale\fR(5), \fBstandards\fR(5)
1057 1047  .SH WARNINGS
1058      -.LP
1059 1048  The following options are obsolete and will not be supported in future
1060 1049  releases:
1061 1050  .sp
1062 1051  .ne 2
1063 1052  .na
1064 1053  \fB\fB-cpio\fR \fIdevice\fR\fR
1065 1054  .ad
1066 1055  .RS 17n
1067 1056  Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format
1068 1057  (5120-byte records).
↓ open down ↓ 3 lines elided ↑ open up ↑
1072 1061  .ne 2
1073 1062  .na
1074 1063  \fB\fB-ncpio\fR \fIdevice\fR\fR
1075 1064  .ad
1076 1065  .RS 17n
1077 1066  Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR
1078 1067  format (5120-byte records).
1079 1068  .RE
1080 1069  
1081 1070  .SH NOTES
1082      -.LP
1083 1071  When using \fBfind\fR to determine files modified within a range of time, use
1084 1072  the \fB-mtime\fR argument \fBbefore\fR the \fB-print\fR argument. Otherwise,
1085 1073  \fBfind\fR gives all files.
1086 1074  .sp
1087 1075  .LP
1088 1076  Some files that might be under the Solaris root file system are actually mount
1089 1077  points for virtual file systems, such as \fBmntfs\fR or \fBnamefs\fR. When
1090 1078  comparing against a \fBufs\fR file system, such files are not selected if
1091 1079  \fB-mount\fR or \fB-xdev\fR is specified in the \fBfind\fR expression.
1092 1080  .sp
1093 1081  .LP
1094 1082  Using the \fB-L\fR or \fB-follow\fR option is not recommended when descending a
1095 1083  file-system hierarchy that is under the control of other users. In particular,
1096 1084  when using \fB-exec\fR, symbolic links can lead the \fBfind\fR command out of
1097 1085  the hierarchy in which it started. Using \fB-type\fR is not sufficient to
1098 1086  restrict the type of files on which the \fB-exec\fR command operates, because
1099 1087  there is an inherent race condition between the type-check performed by the
1100 1088  \fBfind\fR command and the time the executed command operates on the file
1101 1089  argument.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX