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

cp --sparse=auto doesn't create a sparse file #6129

Closed
AnirbanHalder654322 opened this issue Mar 25, 2024 · 1 comment
Closed

cp --sparse=auto doesn't create a sparse file #6129

AnirbanHalder654322 opened this issue Mar 25, 2024 · 1 comment
Labels

Comments

@AnirbanHalder654322
Copy link
Contributor

AnirbanHalder654322 commented Mar 25, 2024

The default coreutils cp behaviour uses standard fs copy as fallback when cow is not available in our filesystem.

Steps to reproduce issue

printf hello > a
./target/release/coreutils cp --sparse=auto a b
du -h b
12K    b
du -h --apparent-size b
11K    b

The correct cp behavior

printf hello > a
/usr/bin/cp --sparse=auto a b
du -h b
4.0K    b
du -h --apparent-size b
11K    b```
@AnirbanHalder654322
Copy link
Contributor Author

Fixed in #6220

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

Successfully merging a pull request may close this issue.

2 participants