xcp
xcp copied to clipboard
Clarify differences with cp
xcp is a (partial) clone of the Unix cp command. It is not intended as a full replacement, but as a companion utility
I think you should clarify even further where xcp stands compared to coreutil's cp:
- either state that the behavior of
xcpis close to the one ofcp, so mention what specificcpoptions or features are not supported for example. The idea is that users that do not use theses options can safely doalias cp=xcpin their interactive shell, and benefit from the progressbar and speedup. or - state that any form of compatibility with
cpis not a goal, or even an inspiration
Fair point. I'm currently refactoring xcp to better support parallelism, which will require expanding the documentation, so I'll look at this then.
Does xcp support preserving attributes?
$ cp --help | rg preserve
-a, --archive same as -dR --preserve=all
-d same as --no-dereference --preserve=links
-p same as --preserve=mode,ownership,timestamps
--preserve[=ATTR_LIST] preserve the specified attributes (default:
--no-preserve=ATTR_LIST don't preserve the specified attributes
xcp does currently preserve some attributes, including permissions and xattrs. There are others we don't ATM, but probably should (timestamps and ownership-when-root). There are other cp options we may decide not to support (e.g. non-numbered-backups).
Basically I'm slowly going through and duplicating features from cp where it seems appropriate. Once that's done I'll write up where xcp differs significantly.
Ack. With a few exceptions the times I need to copy either big files or lots of files, they tend to be media files. I definitely want to preserve timestamps of media files. Hopefully this will be added at some point!
Yeah, the timestamps thing is a straight-up oversight on my part. It'll be fixed in the next release.
Timestamp copy is now in version 0.20.0. Note that this is enabled by default, which is a difference from cp.
Confirmed, awesome! I have no idea what the general opinion is but I've used cp with -a way more than without, so to me it makes more sense as a default. :+1:
See also #50.
The README has been updated with notes on cp differences.