{"id":13559495,"url":"https://github.com/tarka/xcp","last_synced_at":"2026-01-29T05:09:06.055Z","repository":{"id":48382444,"uuid":"158616763","full_name":"tarka/xcp","owner":"tarka","description":"An extended `cp`","archived":false,"fork":false,"pushed_at":"2026-01-19T06:08:53.000Z","size":805,"stargazers_count":881,"open_issues_count":19,"forks_count":30,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-19T13:51:09.233Z","etag":null,"topics":["command-line","copy-files","linux","solid-state-disks","sparse-files"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-21T23:12:49.000Z","updated_at":"2026-01-19T06:08:57.000Z","dependencies_parsed_at":"2024-01-28T05:21:58.578Z","dependency_job_id":"b6277182-d8ab-4778-97da-9b15b92d870a","html_url":"https://github.com/tarka/xcp","commit_stats":{"total_commits":319,"total_committers":8,"mean_commits":39.875,"dds":0.03448275862068961,"last_synced_commit":"4b84eeb92bd37c93f2d7323df0476f4b67d2cee4"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"purl":"pkg:github/tarka/xcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarka%2Fxcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarka%2Fxcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarka%2Fxcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarka%2Fxcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarka","download_url":"https://codeload.github.com/tarka/xcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarka%2Fxcp/sbom","scorecard":{"id":627385,"data":{"date":"2025-08-11","repo":{"name":"github.com/tarka/xcp","commit":"2b07e102b470a53f499288437c39ab42a93025b7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/tarka/xcp/tests.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/tests.yml:75","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T06:52:10.809Z","repository_id":48382444,"created_at":"2025-08-21T06:52:10.810Z","updated_at":"2025-08-21T06:52:10.810Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28863228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","copy-files","linux","solid-state-disks","sparse-files"],"created_at":"2024-08-01T13:00:27.097Z","updated_at":"2026-01-29T05:09:06.049Z","avatar_url":"https://github.com/tarka.png","language":"Rust","funding_links":[],"categories":["Rust","Other","Applications","\u003ca name=\"file-handling\"\u003e\u003c/a\u003eFile and file system handling","File"],"sub_categories":["System tools"],"readme":"# xcp: An extended cp\n\n`xcp` is a (partial) clone of the Unix `cp` command. It is not intended as a\nfull replacement, but as a companion utility with some more user-friendly\nfeedback and some optimisations that make sense under certain tasks (see\nbelow).\n\n[![Crates.io](https://img.shields.io/crates/v/xcp.svg?colorA=777777)](https://crates.io/crates/xcp) \n![Github Actions](https://github.com/tarka/xcp/actions/workflows/tests.yml/badge.svg)\n[![Packaging status](https://repology.org/badge/tiny-repos/xcp.svg)](https://repology.org/project/xcp/versions)\n\n*Warning*: `xcp` is currently beta-level software and almost certainly contains\nbugs and unexpected or inconsistent behaviour. It probably shouldn't be used for\nanything critical yet.\n\nPlease note that there are some known issues with copying files from virtual\nfilesystems (e.g. `/proc`, `/sys`). See [this LWN\narticle](https://lwn.net/Articles/846403/) for an overview of some of the\ncomplexities of dealing with kernel-generated files.  This is a common problem\nwith file utilities which rely on random access; for example `rsync` has the\nsame issue.\n\n## Installation\n\n### Cargo\n\n`xcp` can be installed directly from `crates.io` with:\n```\ncargo install xcp\n```\n\n### Arch Linux\n\n[`xcp`](https://aur.archlinux.org/packages/xcp/) is available on the Arch Linux User Repository. If you use an AUR helper, you can execute a command such as this:\n```\nyay -S xcp\n```\n\n### NetBSD\n[`xcp`](https://pkgsrc.se/sysutils/xcp) is available on NetBSD from the official repositories. To install it, simply run:\n```\npkgin install xcp\n```\n\n## Features and Anti-Features\n\n### Features\n\n* Displays a progress-bar, both for directory and single file copies. This can\n  be disabled with `--no-progress`.\n* On Linux it uses `copy_file_range` call to copy files. This is the most\n  efficient method of file-copying under Linux; in particular it is\n  filesystem-aware, and can massively speed-up copies on network mounts by\n  performing the copy operations server-side. However, unlike `copy_file_range`\n  sparse files are detected and handled appropriately.\n* Support for modern filesystem features such as [reflinks](https://btrfs.readthedocs.io/en/latest/Reflink.html).\n* Optimised for 'modern' systems (i.e. multiple cores, copious RAM, and\n  solid-state disks, especially ones connected into the main system bus,\n  e.g. NVMe).\n* Optional aggressive parallelism for systems with parallel IO. Quick\n  experiments on a modern laptop suggest there may be benefits to parallel\n  copies on NVMe disks. This is obviously highly system-dependent.\n* Switchable 'drivers' to facilitate experimenting with alternative strategies\n  for copy optimisation. Currently 2 drivers are available:\n  * 'parfile': the previous hard-coded xcp copy method, which parallelises\n    tree-walking and per-file copying. This is the default.\n  * 'parblock': An experimental driver that parallelises copying at the block\n    level. This has the potential for performance improvements in some\n    architectures, but increases complexity. Testing is welcome.\n* Non-Linux Unix-like OSs (OS X, *BSD) are supported via fall-back operation\n  (although sparse-files are not yet supported in this case).\n* Optionally understands `.gitignore` files to limit the copied directories.\n* Optional native file-globbing.\n\n### (Possible) future features\n\n* Conversion of files to sparse where appropriate, as with `cp`'s\n  `--sparse=always` flag.\n* Aggressive sparseness detection with `lseek`.\n* On non-Linux OSs sparse-files are not currenty supported but could be added if\n  supported by the OS.\n\n### Differences with `cp`\n\n* Permissions, xattrs and ACLs are copied by default; this can be disabled with\n  `--no-perms`.\n* Virtual file copies are not supported; for example `/proc` and `/sys` files.\n* Character files such as [sockets](https://man7.org/linux/man-pages/man7/unix.7.html) and\n  [pipes](https://man7.org/linux/man-pages/man3/mkfifo.3.html) are copied as\n  devices (i.e. via [mknod](https://man7.org/linux/man-pages/man2/mknod.2.html))\n  rather than copying their contents as a stream.\n* The `--reflink=never` option may silently perform a reflink operation\n  regardless. This is due to the use of\n  [copy_file_range](https://man7.org/linux/man-pages/man2/copy_file_range.2.html)\n  which has no such override and may perform its own optimisations.\n* `cp` 'simple' backups are not supported, only numbered.\n* Some `cp` options are not available but may be added in the future.\n\n## Performance\n\nBenchmarks are mostly meaningless, but the following are results from a laptop\nwith an NVMe disk and in single-user mode. The target copy directory is a git\ncheckout of the Firefox codebase, having been recently gc'd (i.e. a single 4.1GB\npack file). `fstrim -va` and `echo 3 | sudo tee /proc/sys/vm/drop_caches` are\nrun before each test run to minimise SSD allocation performance interference.\n\nNote: `xcp` is optimised for 'modern' systems with lots of RAM and solid-state\ndisks. In particular it is likely to perform worse on spinning disks unless they\nare in highly parallel arrays.\n\n### Local copy\n\n* Single 4.1GB file copy, with the kernel cache dropped each run:\n    * `cp`: ~6.2s\n    * `xcp`: ~4.2s\n* Single 4.1GB file copy, warmed cache (3 runs each):\n    * `cp`: ~1.85s\n    * `xcp`: ~1.7s\n* Directory copy, kernel cache dropped each run:\n    * `cp`: ~48s\n    * `xcp`: ~56s\n* Directory copy, warmed cache (3 runs each):\n    * `cp`: ~6.9s\n    * `xcp`: ~7.4s\n\n### NFS copy\n\n`xcp` uses `copy_file_range`, which is filesystem aware. On NFSv4 this will result\nin the copy occurring server-side rather than transferring across the network. For\nlarge files this can be a significant win:\n\n* Single 4.1GB file on NFSv4 mount\n    * `cp`: 6m18s\n    * `xcp`: 0m37s\n\n### AI Contribution Policy\n\nThis project will not accept runtime code generated by AI. Generation of _draft_\ndocumentation and test code is acceptable, but should be reviewed by the\nsubmitter before raising a PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarka%2Fxcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarka%2Fxcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarka%2Fxcp/lists"}