fd.1
This file
Path
doc/fd.1
290 lines · 7.2 KiB
Last changed by
Add new `--type socket` and `--type pipe` filterssharkdpbefore adoptioncb56add
History of this fileTake it
The walk stopped after 200 commits: lines older than afcdaf2 point at it.
Move snapcraft filesharkdpbefore adoptionafcdaf2
lines 1–40why, one step back1.TH FD 12.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 ,36.I .ignore37or38.I .fdignore39files.40.TPExpand help for `-u`, add to manpageNathan Henriebefore adoption59c27ba
lines 41–43why, one step back41.B \-u, \-\-unrestricted42Alias for '--no-ignore'. Can be repeated; '-uu' is an alias for '--no-ignore --hidden'.43.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 44–56why, one step back44.B \-\-no\-ignore\-vcs45Show search results from files and directories that would otherwise be ignored by46.I .gitignore47files.48.TP49.B \-s, \-\-case\-sensitive50Perform a case-sensitive search. By default, fd uses case-insensitive searches, unless the51pattern contains an uppercase character (smart case).52.TP53.B \-i, \-\-ignore\-case54Perform a case-insensitive search. By default, fd uses case-insensitive searches, unless the55pattern contains an uppercase character (smart case).56.TPUpdate man pagesharkdpbefore adoptionfe79b8c
lines 57–62why, one step back57.B \-g, \-\-glob58Perform a glob-based search instead of a regular expression search.59.TP60.B \-\-regex61Perform a regular-expression based seach (default). This can be used to override --glob.62.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 63–68why, one step back63.B \-F, \-\-fixed\-strings64Treat the pattern as a literal string instead of a regular expression.65.TP66.B \-a, \-\-absolute\-path67Shows the full path starting from the root as opposed to relative paths.68.TPRename --list to --list-detailssharkdpbefore adoptionc9dc617
line 69why, one step back69.B \-l, \-\-list\-detailsAdd `-l`/`--list` optionsharkdpbefore adoptionda5cd12
lines 70–71why, one step back70Use a detailed listing format like 'ls -l'. This is basically an alias71for '--exec-batch ls -l' with some additional 'ls' options. This can be usedRemove claim about unique search resultssharkdpbefore adoption33df48e
lines 72–73why, one step back72to see more metadata, to show symlink targets and to achieve a deterministic73sort order.Add `-l`/`--list` optionsharkdpbefore adoptionda5cd12
line 74why, one step back74.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 75–88why, one step back75.B \-L, \-\-follow76By default, fd does not descend into symlinked directories. Using this flag, symbolic links are77also traversed.78.TP79.B \-p, \-\-full\-path80By default, the search pattern is only matched against the filename (or directory name). Using81this flag, the82.I pattern83is matched against the full path.84.TP85.B \-0, \-\-print086Separate search results by the null character (instead of newlines). Useful for piping results to87.IR xargs .88.TPAdd --max-results=<count> optionsharkdpbefore adoptiond43827f
lines 89–91why, one step back89.B \-\-max\-results count90Limit the number of search results to 'count' and quit immediately.91.TPAdd alias -1 for --max-results=1Danny Möschbefore adoption2bab4a2
lines 92–94why, one step back92.B \-193Limit the search to a single result and quit immediately. This is an alias for '--max-results=1'.94.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 95–98why, one step back95.B \-\-show-errors96Enable the display of filesystem errors for situations such as insufficient97permissions or dead symlinks.98.TPAdd --one-file-system and aliases to man page (#548)Caleb Webberbefore adoptioncab4981
lines 99–101why, one step back99.B \-\-one\-file\-system, \-\-mount, \-\-xdev100By 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).101.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 102–112why, one step back102.B \-h, \-\-help103Print help information.104.TP105.B \-V, \-\-version106Print version information.107.TP108.BI "\-d, \-\-max\-depth " d109Limit directory traversal to at most110.I d111levels of depth. By default, there is no limit on the search depth.112.TPAdd --min-depth and --exact-depthsharkdpbefore adoptiond63c63b
lines 113–118why, one step back113.BI "\-\-min\-depth " d114Only show search results starting at the given depth. See also: '--max-depth' and '--exact-depth'.115.TP116.BI "\-\-exact\-depth " d117Only show search results at the exact given depth. This is an alias for '--min-depth <depth> --max-depth <depth>'.118.TPMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 119–123why, one step back119.BI "\-t, \-\-type " filetype120Filter search by type:121.RS122.IP "f, file"123regular filesFix documentation to filter search by directory typeAlex Leferry 2before adoption46e865f
line 124why, one step back124.IP "d, directory"Move snapcraft filesharkdpbefore adoptionafcdaf2
lines 125–131why, one step back125directories126.IP "l, symlink"127symbolic links128.IP "x, executable"129executable (files)130.IP "e, empty"131empty files or directoriesAdd new `--type socket` and `--type pipe` filterssharkdpbefore adoptioncb56add
lines 132–135why, one step back132.IP "s, socket"133sockets134.IP "p, pipe"135named pipes (FIFOs)Move snapcraft filesharkdpbefore adoptionafcdaf2
lines 136–169why, one step back136.RE137138.RS139This option can be used repeatedly to allow for multiple file types.140.RE141.TP142.BI "\-e, \-\-extension " ext143Filter search results by file extension144.IR ext .145This option can be used repeatedly to allow for multiple possible file extensions.146.TP147.BI "\-E, \-\-exclude " pattern148Exclude files/directories that match the given glob pattern.149This overrides any other ignore logic.150Multiple exclude patterns can be specified.151.TP152.BI "\-\-ignore-file " path153Add a custom ignore-file in '.gitignore' format.154These files have a low precedence.155.TP156.BI "\-c, \-\-color " when157Declare158.I when159to colorize search results:160.RS161.IP auto162Colorize output when standard output is connected to terminal (default).163.IP never164Do not colorize output.165.IP always166Always colorize output.167.RE168.TP169.BI "\-j, \-\-threads " numAdded detail on parallel execution job pool to man page and README.Jason Heerisbefore adoption1daa454
line 170why, one step back170Set number of threads to use for searching & executing (default: number of available CPU cores).Move snapcraft filesharkdpbefore adoptionafcdaf2
lines 171–226why, one step back171.TP172.BI "\-S, \-\-size " size173Limit results based on the size of files using the format174.I <+-><NUM><UNIT>175.RS176.IP '+'177file size must be greater than or equal to this178.IP '-'179file size must be less than or equal to this180.IP 'NUM'181The numeric size (e.g. 500)182.IP 'UNIT'183The units for NUM. They are not case-sensitive.184Allowed unit values:185.RS186.IP 'b'187bytes188.IP 'k'189kilobytes190.IP 'm'191megabytes192.IP 'g'193gigabytes194.IP 't'195terabytes196.IP 'ki'197kibibytes198.IP 'mi'199mebibytes200.IP 'gi'201gibibytes202.IP 'ti'203tebibytes204.RE205.RE206.TP207.BI "\-\-changed-within " date|duration208Filter results based on the file modification time. The argument can be provided as a specific209point in time (\fIYYYY-MM-DD HH:MM:SS\fR) or as a duration (\fI10h, 1d, 35min\fR).210.B --change-newer-than211can be used as an alias.212213Examples:214 \-\-changed-within 2weeks215 \-\-change-newer-than "2018-10-27 10:00:00"216.TP217.BI "\-\-changed-before " date|duration218Filter results based on the file modification time. The argument can be provided as a specific219point in time (\fIYYYY-MM-DD HH:MM:SS\fR) or as a duration (\fI10h, 1d, 35min\fR).220.B --change-older-than221can be used as an alias.222223Examples:224 \-\-changed-before "2018-10-27 10:00:00"225 \-\-change-older-than 2weeks226.TPUpdate man pagesharkdpbefore adoption7f58e8f
line 227why, one step back227.BI "\-x, \-\-exec " commandMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 228–242why, one step back228Execute229.I command230for each search result. The following placeholders are substituted by a path derived from the current search result:231.RS232.IP {}233path234.IP {/}235basename236.IP {//}237parent directory238.IP {.}239path without file extension240.IP {/.}241basename without file extension242.REUpdate man pagesharkdpbefore adoption7f58e8f
lines 243–260why, one step back243.TP244.BI "\-X, \-\-exec-batch " command245Execute246.I command247with all search results at once.248A single occurence of the following placeholders is authorized and substituted by the paths derived from the search results before the command is executed:249.RS250.IP {}251path252.IP {/}253basename254.IP {//}255parent directory256.IP {.}257path without file extension258.IP {/.}259basename without file extension260.REUpdate man pageDeepanshbefore adoptionc60cf9c
line 261why, one step back261.SH PATTERN SYNTAXAdd 'glob' syntax link as wellsharkdpbefore adoption0895027
lines 262–270why, one step back262The regular expression syntax used by fd is documented here:263264.UR https://docs.rs/regex/1.0.0/regex/#syntax265.UE266267The glob syntax is documented here:268269.UR https://docs.rs/globset/#syntax270.UEMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 271–285why, one step back271.SH ENVIRONMENT272.TP273.B LS_COLORS274Determines how to colorize search results, see275.BR dircolors (1) .276.SH EXAMPLES277.TP278.RI "Find files and directories that match the pattern '" needle "':"279$ fd needle280.TP281.RI "Start a search in a given directory (" /var/log "):"282$ fd nginx /var/log283.TP284.RI "Find all Python files (all files with the extention " .py ") in the current directory:"285$ fd -e pyUpdate man pagesharkdpbefore adoption7f58e8f
lines 286–288why, one step back286.TP287.RI "Open all search results with vim:"288$ fd pattern -X vimMove snapcraft filesharkdpbefore adoptionafcdaf2
lines 289–290why, one step back289.SH SEE ALSO290.BR find (1)