2017-10-25 21:16:35 +02:00
|
|
|
.TH FD 1
|
2017-10-17 15:50:55 +02:00
|
|
|
.SH NAME
|
2017-10-25 21:16:35 +02:00
|
|
|
fd \- find entries in the filesystem
|
2017-10-17 15:50:55 +02:00
|
|
|
.SH SYNOPSIS
|
2017-10-19 15:57:27 +02:00
|
|
|
.B fd
|
2017-10-25 22:43:36 +02:00
|
|
|
.RB [ \-HIEsiaLp0hV ]
|
2017-10-25 21:16:35 +02:00
|
|
|
.RB [ \-d
|
2017-10-17 15:50:55 +02:00
|
|
|
.IR depth ]
|
|
|
|
.RB [ \-t
|
|
|
|
.IR filetype ]
|
|
|
|
.RB [ \-e
|
|
|
|
.IR ext ]
|
2017-10-25 22:43:36 +02:00
|
|
|
.RB [ \-E
|
|
|
|
.IR exclude ]
|
2017-10-17 15:50:55 +02:00
|
|
|
.RB [ \-c
|
|
|
|
.IR when ]
|
|
|
|
.RB [ \-j
|
|
|
|
.IR num ]
|
2017-10-19 15:57:27 +02:00
|
|
|
.RB [ \-x
|
2017-11-15 23:34:32 +01:00
|
|
|
.IR cmd ]
|
2017-10-17 15:50:55 +02:00
|
|
|
.RI [ pattern ]
|
2017-12-10 06:40:13 +01:00
|
|
|
.RI [ path... ]
|
2017-10-17 15:50:55 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B fd
|
|
|
|
is a simple, fast and user-friendly alternative to
|
|
|
|
.BR find (1).
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.B \-H, \-\-hidden
|
2018-01-03 10:28:34 +01:00
|
|
|
Include hidden files and directories in the search results.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2017-10-19 15:57:27 +02:00
|
|
|
.B \-I, \-\-no\-ignore
|
2018-01-03 10:28:34 +01:00
|
|
|
Do not respect files like
|
|
|
|
.I .gitignore
|
|
|
|
and
|
2018-02-21 21:41:52 +01:00
|
|
|
.I .fdignore
|
2018-01-03 10:28:34 +01:00
|
|
|
and include ignored files in the search results.
|
2017-11-21 22:54:00 +01:00
|
|
|
.TP
|
|
|
|
.B \-\-no\-ignore\-vcs
|
2018-01-03 10:28:34 +01:00
|
|
|
Do not respect version control ignore files like
|
|
|
|
.I ".gitignore"
|
|
|
|
and include the respective entries in the search results.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2017-10-19 15:57:27 +02:00
|
|
|
.B \-s, \-\-case\-sensitive
|
2017-10-17 15:50:55 +02:00
|
|
|
Perform a case-sensitive search (default: smart case).
|
|
|
|
.TP
|
2017-10-25 21:16:35 +02:00
|
|
|
.B \-i, \-\-ignore\-case
|
|
|
|
Perform a case-insensitive search (default: smart case).
|
|
|
|
.TP
|
2018-02-10 15:19:53 +01:00
|
|
|
.B \-F, \-\-fixed\-strings
|
|
|
|
Treat the pattern as a literal string instead of a regular expression.
|
|
|
|
.TP
|
2017-10-17 15:50:55 +02:00
|
|
|
.B \-a, \-\-absolute\-path
|
|
|
|
Show absolute instead of relative paths.
|
|
|
|
.TP
|
|
|
|
.B \-L, \-\-follow
|
|
|
|
Dereference all symbolic links encountered.
|
|
|
|
.TP
|
|
|
|
.B \-p, \-\-full\-path
|
2018-01-03 10:28:34 +01:00
|
|
|
Match the
|
2017-10-17 15:50:55 +02:00
|
|
|
.I pattern
|
2018-01-03 10:28:34 +01:00
|
|
|
against the full path instead of just the file or directory name.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
|
|
|
.B \-0, \-\-print0
|
2018-01-03 10:28:34 +01:00
|
|
|
Separate search results by null characters instead of newlines.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
|
|
|
.B \-h, \-\-help
|
2018-01-03 10:28:34 +01:00
|
|
|
Print help information.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2017-10-19 15:57:27 +02:00
|
|
|
.B \-V, \-\-version
|
2018-01-03 10:28:34 +01:00
|
|
|
Print version information.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2018-01-03 10:28:34 +01:00
|
|
|
.BI "\-d, \-\-max\-depth " d
|
2017-10-17 15:50:55 +02:00
|
|
|
Limit directory traversal to at most
|
2018-01-03 10:28:34 +01:00
|
|
|
.I d
|
|
|
|
levels of depth. By default, there is no limit on the search depth.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2017-10-25 21:16:35 +02:00
|
|
|
.BI "\-t, \-\-type " filetype
|
2017-10-17 15:50:55 +02:00
|
|
|
Filter search by type:
|
|
|
|
.RS
|
|
|
|
.IP "f, file"
|
|
|
|
regular files
|
|
|
|
.IP "d, directories"
|
|
|
|
directories
|
2018-02-21 22:58:22 +01:00
|
|
|
.IP "l, symlink"
|
2017-10-17 15:50:55 +02:00
|
|
|
symbolic links
|
2018-03-26 10:25:33 +02:00
|
|
|
.IP "x, executable"
|
|
|
|
executable (files)
|
2017-10-17 15:50:55 +02:00
|
|
|
.RE
|
2018-01-03 10:28:34 +01:00
|
|
|
|
|
|
|
.RS
|
|
|
|
This option can be used repeatedly to allow for multiple file types.
|
|
|
|
.RE
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
|
|
|
.BI "\-e, \-\-extension " ext
|
|
|
|
Filter search results by file extension
|
|
|
|
.IR ext .
|
2018-01-03 10:28:34 +01:00
|
|
|
This option can be used repeatedly to allow for multiple possible file extensions.
|
2017-10-25 22:43:36 +02:00
|
|
|
.TP
|
|
|
|
.BI "\-E, \-\-exclude " pattern
|
|
|
|
Exclude files/directories that match the given glob pattern.
|
|
|
|
This overrides any other ignore logic.
|
|
|
|
Multiple exclude patterns can be specified.
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2018-03-26 10:25:33 +02:00
|
|
|
.BI "\-\-ignore-file " path
|
|
|
|
Add a custom ignore-file in '.gitignore' format.
|
|
|
|
These files have a low precedence.
|
|
|
|
.TP
|
2017-10-17 15:50:55 +02:00
|
|
|
.BI "\-c, \-\-color " when
|
|
|
|
Declare
|
|
|
|
.I when
|
2017-10-19 15:57:27 +02:00
|
|
|
to colorize search results:
|
2017-10-17 15:50:55 +02:00
|
|
|
.RS
|
|
|
|
.IP auto
|
2017-10-25 21:16:35 +02:00
|
|
|
Colorize output when standard output is connected to terminal (default).
|
2017-10-17 15:50:55 +02:00
|
|
|
.IP never
|
2017-10-19 15:57:27 +02:00
|
|
|
Do not colorize output.
|
2017-10-17 15:50:55 +02:00
|
|
|
.IP always
|
2017-10-19 15:57:27 +02:00
|
|
|
Always colorize output.
|
2017-10-17 15:50:55 +02:00
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.BI "\-j, \-\-threads " num
|
2017-10-25 21:16:35 +02:00
|
|
|
Number of threads to use for searching (default: number of available CPUs).
|
2017-10-19 15:57:27 +02:00
|
|
|
.TP
|
2017-11-15 03:31:32 +01:00
|
|
|
.BI "\-x, \-\-exec " command "\fR [args...] ;"
|
2017-10-19 15:57:27 +02:00
|
|
|
Execute
|
|
|
|
.I command
|
2017-11-15 03:19:28 +01:00
|
|
|
for each search result. The following placeholders are substituted by a path derived from the current search result:
|
2017-10-19 15:57:27 +02:00
|
|
|
.RS
|
|
|
|
.IP {}
|
|
|
|
path
|
|
|
|
.IP {/}
|
2017-11-15 03:19:28 +01:00
|
|
|
basename
|
2017-10-19 15:57:27 +02:00
|
|
|
.IP {//}
|
2017-11-15 03:19:28 +01:00
|
|
|
parent directory
|
|
|
|
.IP {.}
|
|
|
|
path without file extension
|
2017-10-19 15:57:27 +02:00
|
|
|
.IP {/.}
|
2017-11-15 03:19:28 +01:00
|
|
|
basename without file extension
|
2017-10-19 15:57:27 +02:00
|
|
|
.RE
|
2017-10-17 15:50:55 +02:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.TP
|
2017-10-19 15:57:27 +02:00
|
|
|
.B LS_COLORS
|
|
|
|
Determines how to colorize search results, see
|
|
|
|
.BR dircolors (1) .
|
2017-10-17 15:50:55 +02:00
|
|
|
.SH EXAMPLES
|
|
|
|
.TP
|
2017-10-25 21:16:35 +02:00
|
|
|
.RI "Find files and directories that match the pattern '" needle "':"
|
|
|
|
$ fd needle
|
|
|
|
.TP
|
|
|
|
.RI "Start a search in a given directory (" /var/log "):"
|
2017-10-19 15:57:27 +02:00
|
|
|
$ fd nginx /var/log
|
2017-10-17 15:50:55 +02:00
|
|
|
.TP
|
2017-10-25 21:16:35 +02:00
|
|
|
.RI "Find all Python files (all files with the extention " .py ") in the current directory:"
|
2017-10-17 15:50:55 +02:00
|
|
|
$ fd -e py
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR find (1)
|