Skip to content

Latest commit

 

History

History
executable file
·
52 lines (37 loc) · 1.39 KB

fd.md

File metadata and controls

executable file
·
52 lines (37 loc) · 1.39 KB
title category layout
fd
Linux
2017/sheet

fd

Basic

find files

Fd is a simple, fast and user-friendly alternative to find, implement with Rust.

# find markdown files on _docs folder
fd -e md `pwd`/_docs
# find file with kubernetes prefix on ~/Documents
fd '^kubernetes*' ~/Documents

find files and execute command

Using fd with xargs

fd -e md -d 1 | xargs wc -l

Count lines number of markdown files on current directory.

Advanced

Usage

fd [FLAGS/OPTIONS] [<pattern>] [<path>]
Express Example Description
-d, --max-depth -d 3 Set maximum search depth (default: none)
-t, --type -t f Filter by type: f(ile), d(irectory), (sym)l(ink)
-e, --extension -e md Filter by file extension
-x, --exec ... -x unzip Execute a command for each search result
-E, --exclude ... -E '^test' Exclude entries that match the given glob pattern.
-c, --color -c never When to use colors: never, auto, always
-j, --threads -j 3 Set number of threads to use for searching & executing

See also