samedi 28 février 2015

Why is cp command 4 times slower than copying in Finder in OS X 10.6?


I accidentally stumbled upon this issue:


Copying a 119 MB zip file took 4 times longer in Terminal (cp) than in Finder!


I copied a file of 119 MB size in Terminal with time cp file.zip file2.zip and it took about 20 seconds.


As this seemed quite slow to me, I went to the Finder, selected the same file and hit Cmd-D (duplicate) and it took less than 5 seconds to create the copy, that is only 25% of the time it took with cp!


Is there an explanation for it - might this be systematic?


Used Hard-/Software



  • MacBook 13" white (2007)

  • OS X 10.6.8

  • Internal hard disk WDC WD10JPVT-00A1YT0




it really seems to be a cache issue: I tried the opposite order with another file and copied it first in Finder and then in Terminal, and in this case also the second copying was much faster.





Aucun commentaire:

Enregistrer un commentaire