[PATCH 0/1] copyfilerange: new command to call copy-file-range
Dick Marinus <[email protected]> Tue, 2 Dec 2025 21:14:17 +0100
| Newsgroups | org.kernel.vger.util-linux |
|---|---|
| Message-ID | <[email protected]> |
Hello! I finally finished my work on a command to create reflinked files. Since my last post on this mailing list I found the copy_file_range system call and I named this command after it. I decided to contribute this command first, when this is done I will post another command to find duplicate blocks in two files, which can serve as input of this command. This command should be usable for other use cases as well, it's also possible to create sparse files and it can be used instead of how many people use dd if= of= skip= count= I tried to implement everything in a similar way as used by the other sources in this project (and I learned a lot from it). Nothing is set in stone although I want to keep to the Unix philosophy and not any wild features to this command. Please let me know what can (or must) be added or improved. Dick Marinus (1): copyfilerange: new command to call copy-file-range .gitignore | 1 + configure.ac | 3 + meson.build | 14 ++ meson_options.txt | 2 + misc-utils/Makemodule.am | 9 + misc-utils/copyfilerange.1.adoc | 78 +++++++ misc-utils/copyfilerange.c | 226 +++++++++++++++++++++ misc-utils/meson.build | 5 + tests/commands.sh | 1 + tests/expected/copyfilerange/copyfilerange | 4 + tests/ts/copyfilerange/copyfilerange | 40 ++++ 11 files changed, 383 insertions(+) create mode 100644 misc-utils/copyfilerange.1.adoc create mode 100644 misc-utils/copyfilerange.c create mode 100644 tests/expected/copyfilerange/copyfilerange create mode 100755 tests/ts/copyfilerange/copyfilerange -- 2.51.1