fd-10.4.2

Introduction to fd

The fd package provides a simple, fast, user-friendly alternative to find.

Note

A network connection is needed for building this package. The system certificate store may need to be set up with make-ca before building this package.

fd Dependencies

Required

Rustc

Recommended

Installation of fd

First export some environment variables to enable linking against the system libjemalloc:

export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 &&
export JEMALLOC_OVERRIDE=/usr/lib/libjemalloc.so

Install fd by running the following commands:

cargo build --release

To run the test suite, issue: cargo test --release.

Now, as the root user:

install -vDm755 target/release/fd -t /usr/bin/

Install the man page as the root user, if desired:

install -vDm644 doc/fd.1 -t /usr/share/man/man1/

If you wish to install shell completions, execute the relevant commands for your shell(s) as the root user:

target/release/fd --gen-completions bash | install -vDm644 /dev/stdin /usr/share/bash-completions/completions/fd
target/release/fd --gen-completions fish | install -vDm644 /dev/stdin /usr/share/fish/vendor_completions.d/fd.fish
target/release/fd --gen-completions zsh  | install -vDm644 /dev/stdin /usr/share/zsh/site-functions/_fd

Finally, unset the previously exported environment variables:

unset CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS &&
unset JEMALLOC_OVERRIDE

Command Explanations

cargo build --release --no-default-features --features=completions: This alternative command builds fd without jemalloc.

CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1, JEMALLOC_OVERRIDE=/usr/lib/libjemalloc.so: These environment variables allow building against the system libjemalloc. If unset, a vendored static library is used.

Contents

Installed Programs: fd
Installed Libraries: None
Installed Directories: None

Short Descriptions

fd

is the find alternative