mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:12:43 +00:00 
			
		
		
		
	find: Add the -path and -ipath options
				
					
				
			These options behave the same way as `-name` and `-iname` but match the full file path instead of just the basename.
This commit is contained in:
		
							parent
							
								
									02d2d12592
								
							
						
					
					
						commit
						c006ebe5a3
					
				
					 2 changed files with 38 additions and 5 deletions
				
			
		|  | @ -54,6 +54,19 @@ specified commands, a `-print` command is implicitly appended. | |||
|   * `M`: mebibytes (1024 kibibytes) | ||||
|   * `G`: gibibytes (1024 mebibytes) | ||||
| 
 | ||||
| * `-path pattern`: Checks if the full file path matches the given global-style | ||||
|   pattern. This check matches against the full file name, starting from one of | ||||
|   the start points given on the command line. This means that using an absolute | ||||
|   path only makes sense in the case where the start point given on the command | ||||
|   line is an absolute path. For example, the following command will never match | ||||
|   anything: | ||||
| 
 | ||||
|   `find bar -ipath '/foo/bar/test_file' -print` | ||||
| 
 | ||||
|   The given path is compared against the current directory concatenated with the | ||||
|   basename of the current file. Because such a concatenation can never end in a | ||||
|   '/', specifying path argument that ends with a '/' will never match anything. | ||||
| * `-ipath pattern`: Functions identically to `-path` but is case-insensitive. | ||||
| * `-name pattern`: Checks if the file name matches the given global-style | ||||
|   pattern (case sensitive). | ||||
| * `-empty`: File is either an empty regular file or a directory containing no | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter