![]() Specifically, there are a number of tests that compare files listed on the command lineĪgainst a file we are currently considering. These options also affect how those arguments are processed. GNU find frequently stats files during the processing of the command line itself, beforeĪny searching has begun. Since it is the default, the -P option shouldīe considered to be in effect unless either -H or -L is specified. If more than one of -H, -L and -P is specified, each overrides the others the last oneĪppearing on the command line takes effect. If -H is in effect and one of the paths specified on theĬommand line is a symbolic link to a directory, the contents of that directory willīe examined (though of course -maxdepth 0 would prevent this). The link itself is used as a fallback if the file pointed to by the symbolic linkĬannot be examined. Whatever the link points to (that is, the link is followed). For that situation, the information used is taken from The only exception to thisīehaviour is when a file specified on the command line is a symbolic link, and the Taken from the properties of the symbolic link itself. When find examines or prints information about files, the information used shall be H Do not follow symbolic links, except while processing the command line arguments. Using -L causes the -lname and -ilname predicates Type of the file that a symbolic link points to rather than the link itself (unless When the -L option is in effect, the -type predicate will always match against the Search, the subdirectory pointed to by the symbolic link will be searched. Is in effect and find discovers a symbolic link to a subdirectory during its If you later use the -P option, -noleaf will still be in effect. Unable to examine the file to which the link points). Points, not from the link itself (unless it is a broken symbolic link or find is Information used shall be taken from the properties of the file to which the link ![]() When find examines or prints information about files, the Shall be taken from the properties of the symbolic link itself. Prints information a file, and the file is a symbolic link, the information used You use wildcards in the list of start points). (though ensuring that all start points begin with either `./' or `/' is generally safer if Aĭouble dash - can also be used to signal that any remaining arguments are not options `real' options -H, -L, -P, -D and -O must appear before the first path name, if at all. The behaviour of find but are specified immediately after the last path name. This manual page talks about `options' within the expression list. If no expression is given, theĮxpression -print is used (but you should probably consider using -print0 instead, If no paths are given, the current directory is used. That argument and anyįollowing arguments are taken to be the expression describing what is to be searched for. ![]() Command-line argumentsįollowing these are taken to be names of files or directories to be examined, up to theįirst argument that begins with `-', or the argument `(' or `!'. The -H, -L and -P options control the treatment of symbolic links. That document also includes a lot more detail andĭiscussion than this manual page, so you may find it a more useful source of information. "Security Considerations" chapter of the findutils documentation, which is called Finding Files and comes with findutils. If you are using find in an environment where security is important (for example if youĪre using it to search directories that are writable by other users), you should read the (the left hand side is false for and operations, true for or), at which point find moves ![]() Rooted at each given file name by evaluating the given expression from left to right,Īccording to the rules of precedence (see section OPERATORS), until the outcome is known This manual page documents the GNU version of find. Find - search for files in a directory hierarchy ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |