I have a strange issue that makes no sense, at least not to me. Any help is appreciated.

This method only copies about 1GB of the 1.4GB file

cp /home/buildskel/large1.4gbfile $HOME

This method, "not running in a script" copies the complete file

cp /home/buildskel/large1.4gbfile $HOME
  • 1
    What command are you using to call the script? Do you receive any error message or other output from the script? Is the problem reproducible--that is, have you tried each way multiple times and verified the script always copies only ~1 GB while running cp manually as a single command always copies the whole thing? Is the script you've shown us literally what you are running, or does your script have other lines also? What's the output of echo $?, run immediately after executing your script? What is it when run after running the cp command manually? (Please edit with this info--thanks!) May 14, 2015 at 18:09
  • the script is +x so ./scriptname. Yes the script posted is all there is to it. If I use dd which bypasses the file cache it gets the whole file. May 14, 2015 at 18:36
  • Did you figure this out? I'm having the same problem except my file is 87GB, copied from bash and it only ever copies ~55GB.
    – Brandon
    Apr 7, 2016 at 12:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.