Files
cheatsheet-tldr/tldr/fd
2025-06-13 00:20:43 +00:00

35 lines
799 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# fd
> An alternative to `find`.
> Aims to be faster and easier to use than `find`.
> More information: <https://github.com/sharkdp/fd#how-to-use>.
- 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:
`fd {{[-e|--extension]}} {{txt}}`
- Find files in a specific directory:
`fd "{{string|regex}}" {{path/to/directory}}`
- Include ignored and hidden files in the search:
`fd {{[-H|--hidden]}} {{[-I|--no-ignore]}} "{{string|regex}}"`
- Execute a command on each search result returned:
`fd "{{string|regex}}" {{[-x|--exec]}} {{command}}`