this post was submitted on 30 Jan 2026
60 points (94.1% liked)

Linux

11930 readers
501 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] eleijeep@piefed.social 21 points 4 days ago (5 children)
[–] onlinepersona@programming.dev 16 points 4 days ago (3 children)

It's a damn pain to remember all the flags. How many flags can a program friggin have? I'm always afraid that some flag I enter will reverse the sync and delete everything in the source folder because the target is empty.

I use rsync only when all params have been reseasrched and tested. cpx presumably just requires cpx - r source target instead of 5 rsync flags.

[–] frongt@lemmy.zip 11 points 4 days ago* (last edited 4 days ago) (2 children)

The only one you need is -a. -avz if you want verbose and compression.

[–] FauxLiving@lemmy.world 5 points 4 days ago

--progress=info2 could be a bit shorter imo

[–] onlinepersona@programming.dev 2 points 4 days ago* (last edited 4 days ago) (2 children)

I just looked it up and - x means one filesystem. But does - v give you a progress bar or just a lost of stuff copied?

IIRC rsync also treats the trailing slash in a special manner that I always have to look up.

[–] cyrl@lemmy.world 3 points 4 days ago

The trailing slash is just following cp's own special treatment


# before
dir/
    file1
target/
    orig.txt



# no trailing slash - copy *dir* to target
cp -r /path/to/some/dir /my/target

# after
target/
    orig.txt
    dir/            # dir copied to target
        file1



# with trailing slash - copy *contents* of dir to target
cp -r /path/to/some/dir/ /my/target

# after
target/
    orig.txt
    file1            # contents of dir

[–] frongt@lemmy.zip 1 points 4 days ago

Ha. I meant z. I guess I was getting mixed up with tar.

No slash means the directory. Slash means the items in the directory.

[–] pinball_wizard@lemmy.zip 3 points 3 days ago

I'm always afraid that some flag I enter will reverse the sync and delete everything in the source folder because the target is empty.

A version of rsync without this risk would be a killer app. Haha.

[–] victorz@lemmy.world 7 points 4 days ago (1 children)

What 5 flags did rsync need? I always just do -av and go about my day. And the -v is kinda optional.

[–] onlinepersona@programming.dev 2 points 4 days ago (1 children)

How do you get the progress bar?

[–] victorz@lemmy.world 1 points 4 days ago

--progress 🤷‍♂️

[–] brian@programming.dev 1 points 3 days ago

apparently gets a 2-5x speedup over rsync +nicer interface

[–] ptz@dubvee.org 8 points 4 days ago

That's probably the next wheel some overzealous Rust dev will reinvent.

[–] cm0002@digipres.cafe 4 points 4 days ago

Too many letters to type obvi! /s

[–] sin_free_for_00_days@sopuli.xyz 3 points 4 days ago (1 children)

I've had cp aliased to rsync with my flags for years. It seems like a lot of newcomers try to "fix" stuff before they really understand what's available. Or they just like to play around with different programming languages. Which is fine, but usually it's not really interesting to me.

[–] brian@programming.dev 0 points 3 days ago (1 children)

you seem to have added a condescending comment before you understood the goals. 2-5x speedup over rsync (their benchmarks, but still) seems significant on its own, and an interface that doesn't require aliasing to be useful is also nice

[–] sin_free_for_00_days@sopuli.xyz 0 points 2 days ago (1 children)

Nope, thanks for projecting though. I just didn't mention the multi-threaded because, again, it doesn't speed up anything. Transfer speed has always been the bottleneck, unless you're talking about heavy data-center type use. Like I said, if it's interesting to you, go for it. I don't see a need to reinvent the wheel on core utilities.

[–] brian@programming.dev 1 points 2 days ago

wym doesn't speed anything up? they have a very thorough page of benchmarks