Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests about the clone function #1

Open
RexSkz opened this issue Sep 11, 2023 · 0 comments
Open

Add tests about the clone function #1

RexSkz opened this issue Sep 11, 2023 · 0 comments

Comments

@RexSkz
Copy link

RexSkz commented Sep 11, 2023

I just found a tool that can tell whether two files share the same physical blocks: https://github.com/dyorgio/apfs-clone-checker

$ gcc clone_checker.c -o clone_checker

$ chmod +x clone_checker

$ ls
LICENSE
README.md
clone_checker
clone_checker.c

# normal copy
$ cp README.md README.copy.md

# use copyfile
$ cp -c README.md README.clone.md

$ ./clone_checker README.md README.copy.md
0

$ ./clone_checker README.md README.clone.md
1

# make some changes
$ vi README.clone.md

$ ./clone_checker README.md README.clone.md
0

It could be used to test the clone function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant