Skip to content
Myr

fd.1

This file

Path

doc/fd.1

306 lines · 7.7 KiB

Last changed by

Update --size documentationsharkdpbefore adoptione3c77ef

History of this file

Take it

The walk stopped after 200 commits: lines older than eac20a8 point at it.

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 1–35why, one step back
1.TH FD 1
2.SH NAME3fd \- find entries in the filesystem4.SH SYNOPSIS5.B fd6.RB [ \-HIEsiaLp0hV ]7.RB [ \-d8.IR depth ]9.RB [ \-t10.IR filetype ]11.RB [ \-e12.IR ext ]13.RB [ \-E14.IR exclude ]15.RB [ \-c16.IR when ]17.RB [ \-j18.IR num ]19.RB [ \-x20.IR cmd ]21.RI [ pattern ]22.RI [ path... ]23.SH DESCRIPTION24.B fd25is a simple, fast and user-friendly alternative to26.BR find (1).27.SH OPTIONS28.TP29.B \-H, \-\-hidden30Include hidden files and directories in the search results31(default: hidden files and directories are skipped).32.TP33.B \-I, \-\-no\-ignore34Show search results from files and directories that would otherwise be ignored by35.IR .gitignore ,

Add global fdignore supportBobbie Soedirgobefore adoption79d5a5b

lines 36–38why, one step back
36.IR .ignore ,
37.IR .fdignore ,38or the global ignore file.

Add --regex option to override --globsharkdpbefore adoptioneac20a8

line 39why, one step back
39.TP

Expand help for `-u`, add to manpageNathan Henriebefore adoption59c27ba

lines 40–42why, one step back
40.B \-u, \-\-unrestricted
41Alias for '--no-ignore'. Can be repeated; '-uu' is an alias for '--no-ignore --hidden'.42.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 43–55why, one step back
43.B \-\-no\-ignore\-vcs
44Show search results from files and directories that would otherwise be ignored by45.I .gitignore46files.47.TP48.B \-s, \-\-case\-sensitive49Perform a case-sensitive search. By default, fd uses case-insensitive searches, unless the50pattern contains an uppercase character (smart case).51.TP52.B \-i, \-\-ignore\-case53Perform a case-insensitive search. By default, fd uses case-insensitive searches, unless the54pattern contains an uppercase character (smart case).55.TP

Update man pagesharkdpbefore adoptionfe79b8c

lines 56–61why, one step back
56.B \-g, \-\-glob
57Perform a glob-based search instead of a regular expression search.58.TP59.B \-\-regex60Perform a regular-expression based seach (default). This can be used to override --glob.61.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 62–67why, one step back
62.B \-F, \-\-fixed\-strings
63Treat the pattern as a literal string instead of a regular expression.64.TP65.B \-a, \-\-absolute\-path66Shows the full path starting from the root as opposed to relative paths.67.TP

Rename --list to --list-detailssharkdpbefore adoptionc9dc617

line 68why, one step back
68.B \-l, \-\-list\-details

Add `-l`/`--list` optionsharkdpbefore adoptionda5cd12

lines 69–70why, one step back
69Use a detailed listing format like 'ls -l'. This is basically an alias
70for '--exec-batch ls -l' with some additional 'ls' options. This can be used

Remove claim about unique search resultssharkdpbefore adoption33df48e

lines 71–72why, one step back
71to see more metadata, to show symlink targets and to achieve a deterministic
72sort order.

Add `-l`/`--list` optionsharkdpbefore adoptionda5cd12

line 73why, one step back
73.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 74–87why, one step back
74.B \-L, \-\-follow
75By default, fd does not descend into symlinked directories. Using this flag, symbolic links are76also traversed.77.TP78.B \-p, \-\-full\-path79By default, the search pattern is only matched against the filename (or directory name). Using80this flag, the81.I pattern82is matched against the full path.83.TP84.B \-0, \-\-print085Separate search results by the null character (instead of newlines). Useful for piping results to86.IR xargs .87.TP

Add --max-results=<count> optionsharkdpbefore adoptiond43827f

lines 88–90why, one step back
88.B \-\-max\-results count
89Limit the number of search results to 'count' and quit immediately.90.TP

Add alias -1 for --max-results=1Danny Möschbefore adoption2bab4a2

lines 91–93why, one step back
91.B \-1
92Limit the search to a single result and quit immediately. This is an alias for '--max-results=1'.93.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 94–97why, one step back
94.B \-\-show-errors
95Enable the display of filesystem errors for situations such as insufficient96permissions or dead symlinks.97.TP

Add --one-file-system and aliases to man page (#548)Caleb Webberbefore adoptioncab4981

lines 98–100why, one step back
98.B \-\-one\-file\-system, \-\-mount, \-\-xdev
99By default, fd will traverse the file system tree as far as other options dictate. With this flag, fd ensures that it does not descend into a different file system than the one it started in. Comparable to the -mount or -xdev filters of find(1).100.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 101–111why, one step back
101.B \-h, \-\-help
102Print help information.103.TP104.B \-V, \-\-version105Print version information.106.TP107.BI "\-d, \-\-max\-depth " d108Limit directory traversal to at most109.I d110levels of depth. By default, there is no limit on the search depth.111.TP

Add --min-depth and --exact-depthsharkdpbefore adoptiond63c63b

lines 112–117why, one step back
112.BI "\-\-min\-depth " d
113Only show search results starting at the given depth. See also: '--max-depth' and '--exact-depth'.114.TP115.BI "\-\-exact\-depth " d116Only show search results at the exact given depth. This is an alias for '--min-depth <depth> --max-depth <depth>'.117.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 118–130why, one step back
118.BI "\-t, \-\-type " filetype
119Filter search by type:120.RS121.IP "f, file"122regular files123.IP "d, directory"124directories125.IP "l, symlink"126symbolic links127.IP "x, executable"128executable (files)129.IP "e, empty"130empty files or directories

Add new `--type socket` and `--type pipe` filterssharkdpbefore adoptioncb56add

lines 131–134why, one step back
131.IP "s, socket"
132sockets133.IP "p, pipe"134named pipes (FIFOs)

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 135–187why, one step back
135.RE
136137.RS138This option can be used repeatedly to allow for multiple file types.139.RE140.TP141.BI "\-e, \-\-extension " ext142Filter search results by file extension143.IR ext .144This option can be used repeatedly to allow for multiple possible file extensions.145.TP146.BI "\-E, \-\-exclude " pattern147Exclude files/directories that match the given glob pattern.148This overrides any other ignore logic.149Multiple exclude patterns can be specified.150.TP151.BI "\-\-ignore-file " path152Add a custom ignore-file in '.gitignore' format.153These files have a low precedence.154.TP155.BI "\-c, \-\-color " when156Declare157.I when158to colorize search results:159.RS160.IP auto161Colorize output when standard output is connected to terminal (default).162.IP never163Do not colorize output.164.IP always165Always colorize output.166.RE167.TP168.BI "\-j, \-\-threads " num169Set number of threads to use for searching & executing (default: number of available CPU cores).170.TP171.BI "\-S, \-\-size " size172Limit results based on the size of files using the format173.I <+-><NUM><UNIT>174.RS175.IP '+'176file size must be greater than or equal to this177.IP '-'178file size must be less than or equal to this179.IP 'NUM'180The numeric size (e.g. 500)181.IP 'UNIT'182The units for NUM. They are not case-sensitive.183Allowed unit values:184.RS185.IP 'b'186bytes187.IP 'k'

Update --size documentationsharkdpbefore adoptione3c77ef

line 188why, one step back
188kilobytes (base ten, 10^3 = 1000 bytes)

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 189–195why, one step back
189.IP 'm'
190megabytes191.IP 'g'192gigabytes193.IP 't'194terabytes195.IP 'ki'

Update --size documentationsharkdpbefore adoptione3c77ef

line 196why, one step back
196kibibytes (base two, 2^10 = 1024 bytes)

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 197–225why, one step back
197.IP 'mi'
198mebibytes199.IP 'gi'200gibibytes201.IP 'ti'202tebibytes203.RE204.RE205.TP206.BI "\-\-changed-within " date|duration207Filter results based on the file modification time. The argument can be provided as a specific208point in time (\fIYYYY-MM-DD HH:MM:SS\fR) or as a duration (\fI10h, 1d, 35min\fR).209.B --change-newer-than210can be used as an alias.211212Examples:213 \-\-changed-within 2weeks214 \-\-change-newer-than "2018-10-27 10:00:00"215.TP216.BI "\-\-changed-before " date|duration217Filter results based on the file modification time. The argument can be provided as a specific218point in time (\fIYYYY-MM-DD HH:MM:SS\fR) or as a duration (\fI10h, 1d, 35min\fR).219.B --change-older-than220can be used as an alias.221222Examples:223 \-\-changed-before "2018-10-27 10:00:00"224 \-\-change-older-than 2weeks225.TP

[ownership] document --owner in manpage and changelogAlexandru Macoveibefore adoptiona9dc45e

lines 226–234why, one step back
226.BI "-o, \-\-owner " [user][:group]
227Filter files by their user and/or group. Format: [(user|uid)][:(group|gid)]. Either side228is optional. Precede either side with a '!' to exclude files instead.229230Examples:231 \-\-owner john232 \-\-owner :students233 \-\-owner "!john:students"234.TP

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 235–268why, one step back
235.BI "\-x, \-\-exec " command
236Execute237.I command238for each search result. The following placeholders are substituted by a path derived from the current search result:239.RS240.IP {}241path242.IP {/}243basename244.IP {//}245parent directory246.IP {.}247path without file extension248.IP {/.}249basename without file extension250.RE251.TP252.BI "\-X, \-\-exec-batch " command253Execute254.I command255with all search results at once.256A single occurence of the following placeholders is authorized and substituted by the paths derived from the search results before the command is executed:257.RS258.IP {}259path260.IP {/}261basename262.IP {//}263parent directory264.IP {.}265path without file extension266.IP {/.}267basename without file extension268.RE

Update man pageDeepanshbefore adoptionc60cf9c

line 269why, one step back
269.SH PATTERN SYNTAX

Add 'glob' syntax link as wellsharkdpbefore adoption0895027

lines 270–278why, one step back
270The regular expression syntax used by fd is documented here:
271272.UR https://docs.rs/regex/1.0.0/regex/#syntax273.UE274275The glob syntax is documented here:276277.UR https://docs.rs/globset/#syntax278.UE

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 279–283why, one step back
279.SH ENVIRONMENT
280.TP281.B LS_COLORS282Determines how to colorize search results, see283.BR dircolors (1) .

Add global fdignore supportBobbie Soedirgobefore adoption79d5a5b

lines 284–291why, one step back
284.TP
285.B XDG_CONFIG_HOME, HOME286Used to locate the global ignore file. If287.B XDG_CONFIG_HOME288is set, use289.IR $XDG_CONFIG_HOME/fd/ignore .290Otherwise, use291.IR $HOME/.config/fd/ignore .

Add --regex option to override --globsharkdpbefore adoptioneac20a8

lines 292–306why, one step back
292.SH EXAMPLES
293.TP294.RI "Find files and directories that match the pattern '" needle "':"295$ fd needle296.TP297.RI "Start a search in a given directory (" /var/log "):"298$ fd nginx /var/log299.TP300.RI "Find all Python files (all files with the extention " .py ") in the current directory:"301$ fd -e py302.TP303.RI "Open all search results with vim:"304$ fd pattern -X vim305.SH SEE ALSO306.BR find (1)