snippetbashTip
fd — Find entries in the filesystem. See also: `find`. More information: <https://github.com/sharkdp/fd#h
Viewed 0 times
thecommandfindclifilesystementriesfdsee
Problem
How to use the
fd command: Find entries in the filesystem. See also: find. More information: <https://github.com/sharkdp/fd#how-to-use>.Solution
fd — Find entries in the filesystem. See also: 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}}"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}}"Code Snippets
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}}"Context
tldr-pages: common/fd
Revisions (0)
No revisions yet.