A modern file copy utility written in Rust that provides visual feedback during file operations. CPV works similarly to the standard cp
command but adds a progress bar, ETA, and transfer speed information.
- 📊 Live progress bar showing copy progress
- ⏱️ Estimated time remaining (ETA)
- 📈 Transfer speed monitoring
- 📁 Support for both files and directories
- 🔄 Recursive directory copying
- 🛡️ Preserve file attributes
- 📝 Human-readable file sizes
- 🎯 Standard cp-like behavior
Several installation methods are available:
- Using Flakes (recommended):
# Install directly
nix profile install github:gohm44/cpv
# Or try without installing
nix run github:gohm44/cpv
- Through NixOS configuration:
# In configuration.nix
{
inputs.cpv.url = "github:gohm44/cpv";
environment.systemPackages = [ inputs.cpv.packages.${system}.default ];
}
- Using home-manager:
# In home.nix
{
home.packages = [ inputs.cpv.packages.${pkgs.system}.default ];
}
# Clone the repository
git clone https://github.com/gohm44/cpv.git
cd cpv
# Build and install
cargo install --path .
CPV follows the standard cp
command syntax with additional features:
# Copy a single file
cpv source.txt destination.txt
# Copy a file into a directory
cpv file.txt /existing/directory/
# Copy directory (requires -r flag)
cpv -r source_dir target_dir
# Copy directory into existing directory
cpv -r source_dir /existing/directory/
# Copy with attribute preservation
cpv -p source.txt destination.txt
# Copy with verbose output
cpv -v source.txt destination.txt
OPTIONS:
-r, --recursive Copy directories recursively
-p, --preserve Preserve file attributes
-f, --force Force overwrite existing files
-v, --verbose Show verbose output with transfer statistics
-h, --help Print help information
- Copy a single file with progress:
cpv large_file.iso backup.iso
- Copy a directory recursively:
cpv -r my_project project_backup
- Copy with all features enabled:
cpv -rpvf source_dir destination_dir
- Rust 1.70.0 or higher
- Cargo
cargo build --release
cargo test
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat: add some amazing feature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.