find¶
Find file system items, optionally matching a search term.
Synopsis¶
Description¶
Search for files and directories by name. If no search term is provided, all matching items are listed.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--search-type |
-s |
Type of search: exact, contains, prefix, suffix, regex |
contains |
--ignore-case |
-i |
Perform case-insensitive search | false |
--work-dir |
-c |
Directory to start the search from | . |
--types |
-t |
Types to search for: file, dir, all |
all |
--quiet |
-q |
Suppress error messages | false |
Examples¶
Find all files containing "test" in their name:
Find files with exact name match:
Find files starting with "main":
Find files ending with ".go":
Find using regex pattern:
Search case-insensitively:
Find only directories:
Find only files:
Search in a specific directory: