1FD(1)                       General Commands Manual                      FD(1)
2
3
4

NAME

6       fd - find entries in the filesystem
7

SYNOPSIS

9       fd  [-HIEsiaLp0hV]  [-d  depth] [-t filetype] [-e ext] [-E exclude] [-c
10       when] [-j num] [-x cmd] [pattern] [path...]
11

DESCRIPTION

13       fd is a simple, fast and user-friendly alternative to find(1).
14

OPTIONS

16       -H, --hidden
17              Include hidden files  and  directories  in  the  search  results
18              (default: hidden files and directories are skipped).
19
20       -I, --no-ignore
21              Show search results from files and directories that would other‐
22              wise be ignored by .gitignore, .ignore or .fdignore files.
23
24       --no-ignore-vcs
25              Show search results from files and directories that would other‐
26              wise be ignored by .gitignore files.
27
28       -s, --case-sensitive
29              Perform a case-sensitive search. By default, fd uses case-insen‐
30              sitive searches, unless the pattern contains an uppercase  char‐
31              acter (smart case).
32
33       -i, --ignore-case
34              Perform  a  case-insensitive  search.  By default, fd uses case-
35              insensitive searches, unless the pattern contains  an  uppercase
36              character (smart case).
37
38       -g, --glob
39              Perform  a  glob-based  search  instead  of a regular expression
40              search.
41
42       --regex
43              Perform a regular-expression based seach (default). This can  be
44              used to override --glob.
45
46       -F, --fixed-strings
47              Treat  the  pattern  as  a  literal  string instead of a regular
48              expression.
49
50       -a, --absolute-path
51              Shows the full path starting from the root as opposed  to  rela‐
52              tive paths.
53
54       -L, --follow
55              By  default,  fd  does  not  descend into symlinked directories.
56              Using this flag, symbolic links are also traversed.
57
58       -p, --full-path
59              By default, the search pattern is only matched against the file‐
60              name  (or  directory  name).  Using  this  flag,  the pattern is
61              matched against the full path.
62
63       -0, --print0
64              Separate search results by the null character (instead  of  new‐
65              lines). Useful for piping results to xargs.
66
67       --show-errors
68              Enable  the  display of filesystem errors for situations such as
69              insufficient permissions or dead symlinks.
70
71       -h, --help
72              Print help information.
73
74       -V, --version
75              Print version information.
76
77       -d, --max-depth d
78              Limit directory traversal to at  most  d  levels  of  depth.  By
79              default, there is no limit on the search depth.
80
81       -t, --type filetype
82              Filter search by type:
83
84              f, file
85                     regular files
86
87              d, directory
88                     directories
89
90              l, symlink
91                     symbolic links
92
93              x, executable
94                     executable (files)
95
96              e, empty
97                     empty files or directories
98
99              This  option  can  be used repeatedly to allow for multiple file
100              types.
101
102       -e, --extension ext
103              Filter search results by file extension ext.  This option can be
104              used repeatedly to allow for multiple possible file extensions.
105
106       -E, --exclude pattern
107              Exclude  files/directories  that  match  the given glob pattern.
108              This overrides any other ignore logic.   Multiple  exclude  pat‐
109              terns can be specified.
110
111       --ignore-file path
112              Add  a  custom  ignore-file in '.gitignore' format.  These files
113              have a low precedence.
114
115       -c, --color when
116              Declare when to colorize search results:
117
118              auto   Colorize output when standard output is connected to ter‐
119                     minal (default).
120
121              never  Do not colorize output.
122
123              always Always colorize output.
124
125       -j, --threads num
126              Set number of threads to use for searching & executing (default:
127              number of available CPU cores).
128
129       -S, --size size
130              Limit results based on  the  size  of  files  using  the  format
131              <+-><NUM><UNIT>
132
133              '+'    file size must be greater than or equal to this
134
135              '-'    file size must be less than or equal to this
136
137              'NUM'  The numeric size (e.g. 500)
138
139              'UNIT' The  units for NUM. They are not case-sensitive.  Allowed
140                     unit values:
141
142                     'b'    bytes
143
144                     'k'    kilobytes
145
146                     'm'    megabytes
147
148                     'g'    gigabytes
149
150                     't'    terabytes
151
152                     'ki'   kibibytes
153
154                     'mi'   mebibytes
155
156                     'gi'   gibibytes
157
158                     'ti'   tebibytes
159
160       --changed-within date|duration
161              Filter results based on the file modification time. The argument
162              can  be  provided  as  a  specific  point  in  time  (YYYY-MM-DD
163              HH:MM:SS) or as a duration (10h,  1d,  35min).   --change-newer-
164              than can be used as an alias.
165
166              Examples:
167                --changed-within 2weeks
168                --change-newer-than "2018-10-27 10:00:00"
169
170       --changed-before date|duration
171              Filter results based on the file modification time. The argument
172              can  be  provided  as  a  specific  point  in  time  (YYYY-MM-DD
173              HH:MM:SS)  or  as  a duration (10h, 1d, 35min).  --change-older-
174              than can be used as an alias.
175
176              Examples:
177                --changed-before "2018-10-27 10:00:00"
178                --change-older-than 2weeks
179
180       -x, --exec command
181              Execute command for each search result. The following placehold‐
182              ers  are  substituted  by a path derived from the current search
183              result:
184
185              {}     path
186
187              {/}    basename
188
189              {//}   parent directory
190
191              {.}    path without file extension
192
193              {/.}   basename without file extension
194
195       -X, --exec-batch command
196              Execute command with all  search  results  at  once.   A  single
197              occurence  of  the following placeholders is authorized and sub‐
198              stituted by the paths derived from the search results before the
199              command is executed:
200
201              {}     path
202
203              {/}    basename
204
205              {//}   parent directory
206
207              {.}    path without file extension
208
209              {/.}   basename without file extension
210

ENVIRONMENT

212       LS_COLORS
213              Determines how to colorize search results, see dircolors(1).
214

EXAMPLES

216       Find files and directories that match the pattern 'needle':
217              $ fd needle
218
219       Start a search in a given directory (/var/log):
220              $ fd nginx /var/log
221
222       Find all Python files (all files with the extention .py) in the current
223       directory:
224              $ fd -e py
225
226       Open all search results with vim:
227              $ fd pattern -X vim
228

SEE ALSO

230       find(1)
231
232
233
234                                                                         FD(1)
Impressum