fastcp-cli 0.2.3

a fast cp wrapper using --reflink=always
fastcp-cli-0.2.3 is not a library.

fastcp

fastcp — a fast cp wrapper

Disclaimers

  1. fastcp is NOT a replacement for cp. fastcp just appends --reflink=always to cp commands on filesystems that support it. You need to have cp installed in order to make fastcp work.
  2. fastcp may be slightly slower (~5ms) than normal cp on small files, but will be faster on big files over 10GB. fastcp will always be faster than cp on slow drives, if a supported filesystem is used.
  3. This is the Rust rewrite. It detects CoW/reflink support once per device and caches the result in ~/.config/fastcp/, instead of re-detecting on every single copy like the old shell version did.
  4. Want the plain Bash version instead (e.g. you don't want to compile anything)? Switch to the bash branch, it has its own README with its own install instructions (It's not so-nicely written though).

Table of Contents

Quick Start

  • On Arch
paru -S fastcp 
# or fastcp-bin for a prebuilt release
  • Non-arch
cargo install fastcp-cli

Note: Make sure ~/.cargo/bin is in your PATH. It's added automatically by rustup, but if fastcp isn't found, add this to your shell config file:

# If you use Bash:
export PATH="$HOME/.cargo/bin:$PATH"

# If you use Fish:
fish_add_path $HOME/.cargo/bin

# If you use Zsh:
export PATH="$PATH:$HOME/.cargo/bin"
# Use it!
fastcp /path/to/input /path/to/destination

Uninstall

cargo uninstall fastcp-cli && rm -rf ~/.config/fastcp

Usage

fastcp is a wrapper around cp that appends --reflink=always when it makes sense and is supported. You can use it exactly like cp. There is no difference in flags.

To force fastcp to re-detect reflink support for a device (e.g. after converting a filesystem or enabling XFS reflink), just delete the matching file in ~/.config/fastcp/.