2025-03-14 21:59:59 -06:00
|
|
|
# fd
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
> Find entries in the filesystem.
|
|
|
|
|
> See also: `find`.
|
2025-07-24 22:27:13 -06:00
|
|
|
> More information: <https://github.com/sharkdp/fd#how-to-use>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Recursively find files matching a specific pattern in the current directory:
|
|
|
|
|
|
|
|
|
|
`fd "{{string|regex}}"`
|
|
|
|
|
|
|
|
|
|
- Find files that begin with a specific string:
|
|
|
|
|
|
|
|
|
|
`fd "{{^string}}"`
|
|
|
|
|
|
|
|
|
|
- Find files with a specific extension:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`fd {{[-e|--extension]}} {{txt}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Find files in a specific directory:
|
|
|
|
|
|
|
|
|
|
`fd "{{string|regex}}" {{path/to/directory}}`
|
|
|
|
|
|
|
|
|
|
- Include ignored and hidden files in the search:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`fd {{[-H|--hidden]}} {{[-I|--no-ignore]}} "{{string|regex}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
- Exclude files that match a specific `regex`:
|
|
|
|
|
|
|
|
|
|
`fd {{string}} {{[-E|--exclude]}} {{regex}}`
|
|
|
|
|
|
2025-03-14 21:59:59 -06:00
|
|
|
- Execute a command on each search result returned:
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
`fd "{{string|regex}}" {{[-x|--exec]}} {{command}}`
|