1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/fd.md

30 lines
659 B
Markdown
Raw Normal View History

2017-10-20 21:12:59 -05:00
# fd
> An alternative to `find`.
> Aims to be faster and easier to use than `find`.
2019-06-07 11:58:11 +01:00
> More information: <https://github.com/sharkdp/fd>.
2017-10-20 21:12:59 -05:00
2022-12-07 15:57:21 +10:00
- Recursively find files matching a specific pattern in the current directory:
2017-10-20 21:12:59 -05:00
2022-12-07 15:57:21 +10:00
`fd "{{string|regex}}"`
2017-10-20 21:12:59 -05:00
- Find files that begin with a specific string:
2017-10-20 21:12:59 -05:00
`fd "{{^string}}"`
2017-10-20 21:12:59 -05:00
2017-10-20 21:24:07 -05:00
- Find files with a specific extension:
2017-10-20 21:12:59 -05:00
`fd --extension {{txt}}`
2017-10-20 21:12:59 -05:00
2019-01-11 11:06:58 +01:00
- Find files in a specific directory:
2017-10-20 21:12:59 -05:00
2022-12-07 15:57:21 +10:00
`fd "{{string|regex}}" {{path/to/directory}}`
2017-10-20 21:24:07 -05:00
2019-01-11 11:06:58 +01:00
- Include ignored and hidden files in the search:
2017-10-20 21:24:07 -05:00
2022-12-07 15:57:21 +10:00
`fd --hidden --no-ignore "{{string|regex}}"`
2020-12-11 22:12:55 -05:00
- Execute a command on each search result returned:
2022-12-07 15:57:21 +10:00
`fd "{{string|regex}}" --exec {{command}}`