commands.sh

fd

all

Find entries in the filesystem. See also: `find`.

More info →

Options (6)

-e, --extensionboolean

Find files with a specific extension

Example: fd {{[-e|--extension]}} {{txt}}
-H, --hiddenboolean

Include ignored and hidden files in the search

Example: fd {{[-H|--hidden]}} {{[-I|--no-ignore]}} "{{string|regex}}"
-I, --no-ignoreboolean

Include ignored and hidden files in the search

Example: fd {{[-H|--hidden]}} {{[-I|--no-ignore]}} "{{string|regex}}"
-E, --excludeboolean

Exclude files that match a specific glob pattern

Example: fd {{string}} {{[-E|--exclude]}} {{glob}}
-x, --execboolean

Execute a command on each search result returned

Example: fd "{{string|regex}}" {{[-x|--exec]}} {{command}}
-d, --max-depthboolean

Find files only in the current directory

Example: fd {{[-d|--max-depth]}} 1 "{{string|regex}}"

Examples (8)

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"

Exclude files that match a specific glob pattern

fd string [-E|--exclude] glob

Execute a command on each search result returned

fd "string|regex" [-x|--exec] command

Find files only in the current directory

fd [-d|--max-depth] 1 "string|regex"
made by @shridhargupta | data from tldr-pages