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

[xrdcp] what exactly does --force do? #307

Closed
cshimmin opened this issue Nov 23, 2015 · 2 comments
Closed

[xrdcp] what exactly does --force do? #307

cshimmin opened this issue Nov 23, 2015 · 2 comments

Comments

@cshimmin
Copy link

It seems like it's doing something smart (namely, detecting whether files have changed and copying only what it has to). But the description in the man page makes it sound like it's doing something very dumb:

       -f | --force
            re-creates a file if it is already present.

To me, "re-creating" the file sounds like it clobbers the existing version and starts over from scratch, which would be really time consuming, especially if the data is being transferred over the internet. So I have been scared of using this feature to resume/validate partial or completed datasets.

However though trial-and-error I'm seeing that when copying existing/identical files with -f, the rate seems to be limited only by my disk I/O speed at the source, which I infer is because it is checksumming the files. Or maybe disk caches just work way better than I ever imagined...

So could someone please confirm, which is it? If it's doing the smart thing, that is really a nice feature and should be advertised in the man file and --help output!

@abh3
Copy link
Member

abh3 commented Nov 25, 2015

The force option does essentially the same thing as the "-f" option on the cp command. If the destination file exists it is deleted and overwritten. Otherwise, xrdcp would complain that the file exists. The xrdcp command has no feature to copy partial files or complete a partially copied file.

@cshimmin
Copy link
Author

Thank you for clarifying.

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

2 participants