cpx Introduced as a Faster, Modern Replacement for Linux cp

A new Rust-based tool called cpx offers a modern alternative to the traditional cp command on Linux, adding parallel copying, progress bars, resume support, and configurable defaults.

As we all know, file copying on Linux has long relied on the classic cp command, which remains reliable but offers little feedback and limited control over long or complex operations.

To address this, a promising new Rust-based command-line tool called cpx emerge, designed as an alternative rather than a replacement, that approaches the same task with a focus on performance, visibility, and configurability.

It targets scenarios where large directory trees, interrupted transfers, or the need for detailed progress reporting make standard tools less convenient to use. The project is currently Linux-only and leverages modern kernel features to improve copy throughput and reliability.

Benchmarks published by the project show copy times up to four to five times faster than cp on large file sets. Now, let’s cycle through the main characteristics of cpx.

  • Parallel file copying: cpx performs multiple copy operations concurrently. Users can control the level of parallelism, allowing the tool to better utilize fast storage and multi-core systems.
  • Progress reporting: The tool includes built-in progress bars that show the copy’s real-time status. Progress output is customizable and can be configured globally or per project.
  • Resumable transfers: Interrupted copy jobs can be resumed later using checksum verification, and already copied files are automatically skipped.
  • Exclude patterns: cpx supports exclude rules similar to .gitignore, allowing users to omit files or directories such as version control metadata, build outputs, or temporary files. Excludes can be defined on the command line or in configuration files.
  • Persistent configuration: Defaults for copy behavior can be stored in configuration files at the project, user, or system level. Settings include recursion, parallelism, progress style, reflink usage, and attribute preservation.
  • Linux-specific filesystem features: The tool supports extended attributes, SELinux context preservation, timestamps, ownership, hard links, and optional copy-on-write reflinks on supported filesystems.
  • Flexible copy behavior: cpx includes options for interactive overwrites, backups, handling of symlinks and hard links, attribute-only copies, and fine-grained control over how destinations are created or replaced.

Installation is very simple, available via a shell script. To get started with scp, just run:

curl -fsSL https://raw.githubusercontent.com/11happy/cpx/main/install.sh | bashCode language: Bash (bash)

While macOS and Windows support are listed on the project roadmap, the current release focuses exclusively on Linux. For more information, see the tool’s GitHub page.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *