FD(1) General Commands Manual FD(1) (NAME) fd - (SYNOPSIS) fd [-HIEsiaLp0hV] [-d depth] [-t filetype] [-e ext] [-E exclude] [-c when] [-j num] [-x cmd] [pattern [path...]] (DESCRIPTION) fd find(1) . fd . --glob . fd gitignore .ignore .fdignore . '' . . --search-path () . . (OPTIONS) -H, --hidden (: ). --no-hidden . --no-ignore --no-ignore-vcs . -I, --no-ignore : o .gitignore o .git/info/exclude o gitignore ( $HOME/.config/git/ignore) o .ignore o .fdignore o fd ( $HOME/.config/fd/ignore ) --ignore . -u, --unrestricted . --hidden --no-ignore . --no-ignore-vcs gitignore .gitignore .git/info/exclude gitignore (core.excludesFile git $HOME/.config/git/ignore ). --ignore-vcs . --no-require-git git gitignore. fd gitignore .gitignore git . fd git git . --require-git . --no-ignore-parent gitignore . -s, --case-sensitive . fd (smart case). -i, --ignore-case . fd (smart case). -g, --glob . --full-path '**' . --regex (). --glob . -F, --fixed-strings (literal string) . . --glob --exact . --exact . --fixed-strings ( --full-path) . regex . --glob --fixed-strings . --and pattern . . --glob --fixed-strings . -a, --absolute-path . --relative-path . -l, --list-details 'ls -l'. --exec-batch ls -l 'ls' . . -L, --follow fd (symlink) . . --no-follow . -p, --full-path ( ) . pattern . -0, --print0 null ( ). (pipe) xargs . --max-results count 'count' . -1 . --max-results=1 . -q, --quiet 0 . 1 . . --has-results . --show-errors (dead symlinks). --strip-cwd-prefix [when] -x/ --exec -X/ --exec-batch -0/ --print0 './' '-' . . "always" . : never ./ always ./ auto --exec --exec-batch --print0 . . --one-file-system, --mount, --xdev fd . fd . -mount -xdev find(1). -h, --help . -V, --version . -d, --max-depth d d . . --min-depth d . : --max-depth --exact-depth. --exact-depth d . --min-depth --max-depth . --prune . -t, --type filetype : f, file (regular files) d, dir, directory l, symlink (symbolic links) b, block-device (block devices) c, char-device (character devices) s, socket (sockets) p, pipe (FIFOs) x, executable e, empty . '--type file --type symlink' . 'executable' 'empty' : '--type executable' '--type file' . '--type empty' '--type file' '--type directory' . : - : fd --type file fd -tf - : fd --type file --type symlink fd -tf -tl - : fd --type executable fd -tx - : fd --type empty --type file fd -te -tf - : fd --type empty --type directory fd -te -td -e, --extension ext ext. . . --type . '^[^.]+$' . -E, --exclude glob / . . . : --exclude '*.pyc' --exclude node_modules --ignore-contain name () . . --ignore-file path '.gitignore'. . -c, --color when (when) : auto (). never . always . --hyperlink (file URL) . auto always never . "never" "auto" . "auto" "always" . auto . never . always . -j, --threads num (threads) (: ). -S, --size size <+-> '+' '-' '+' '-' . 'NUM' ( 500) 'UNIT' NUM. . : 'b' (bytes) 'k' ( 10^3 = 1000 ) 'm' 'g' 't' 'ki' ( 2^10 = 1024 ) 'mi' 'gi' 'ti' --changed-within date|duration . . (10h, 1d, 35min) RFC3339 - (YYYY-MM-DD YYYY-MM-DD HH:MM:SS) '@' (@[0-9]+) . --change-newer-than --newer --changed-after . : --changed-within 2weeks --change-newer-than "2018-10-27 10:00:00" --newer 2018-10-27 --changed-after @1704067200 --changed-before date|duration . . (10h, 1d, 35min) RFC3339 - (YYYY-MM-DD YYYY-MM-DD HH:MM:SS) '@' (@[0-9]+) . --change-older-than --older . : --changed-before "2018-10-27 10:00:00" --change-older-than 2weeks --older @1704067200 -o, --owner [user][:group] / . : [(user|uid)][:(group|gid)]. . '!' . : --owner john --owner :students --owner "!john:students" -C, --base-directory path fd . . path --search-path fd . --path-separator separator . ('/' '\' ). --search-path search-path path. : 'fd [FLAGS/OPTIONS] --search-path PATH --search-path PATH2 [PATTERN]' --format fmt . : {} ( ) {/} (basename) {//} {.} {/.} {{ '{' ( ) }} '}' ( ) "{{" "}}" "{" "}" . -x, --exec command command ( --threads=1 ). command - fd. -x/--exec . ';' fd . ';' : '\;'. . ';' . (non- deterministic) . --threads=1 . . . --format . "{}" . --print0 (\0) . () . : - *.zip : fd -e zip -x unzip - *.h *.cpp "clang-format -i .." : fd -e h -e cpp -x clang-format -i - *.jpg *.png: fd -e jpg -x convert {} {.}.png - stat *.txt : fd -0 -e txt -x stat -X, --exec-batch command command . . --format --exec . "{}" . --exec command ';' . . --exec . : - test_*.py : fd -g 'test_*.py' -X vim "vim" . - *.rs "wc -l ...": fd -e rs -X wc -l --batch-size size -X. -X . () . (PATTERN SYNTAX) fd : https://docs.rs/regex/1.0.0/regex/#syntax : https://docs.rs/globset/#syntax (ENVIRONMENT) LS_COLORS : dircolors(1). NO_COLOR . XDG_CONFIG_HOME, HOME . XDG_CONFIG_HOME $XDG_CONFIG_HOME/fd/ignore . $HOME/.config/fd/ignore . (FILES) .fdignore .gitignore . fd --no-ignore-vcs . $XDG_CONFIG_HOME/fd/ignore . ( --no-ignore) .fdignore . (EXAMPLES) 'needle' : $ fd needle (/var/log): $ fd nginx /var/log ( .py) : $ fd -e py vim: $ fd pattern -X vim (Tips and Tricks) o ".git/" ($XDG_CONFIG_HOME/fd/ignore) ".git" --hidden . o (alias) (wrapper) fd . gitignore `alias fd="/usr/bin/fd --no-ignore-vcs"` bashrc. fd git . (BUGS) : https://github.com/sharkdp/fd/issues (SEE ALSO) find(1) FD(1)