What's faster, cp -R or unpacking tar.gz files?

Posted by Buttle Butkus on Server Fault See other posts from Server Fault or by Buttle Butkus
Published on 2012-10-18T21:11:14Z Indexed on 2012/10/18 23:04 UTC
Read the original article Hit count: 189

Filed under:
|
|

I have some tar.gz files that total many gigabytes on a CentOS system. Most of the tar.gz files are actually pretty small, but the ones with images are large. One is 7.7G, another is about 4G, and a couple around 1G.

I have unpacked the files once already and now I want a second copy of all those files.

I assumed that copying the unpacked files would be faster than re-unpacking them. But I started running cp -R about 10 minutes ago and so far less than 500M is copied. I feel certain that the unpacking process was faster.

Am I right?

And if so, why? It doesn't seem to make sense that unpacking would be faster than simply duplicating existing structures.

© Server Fault or respective owner

Related posts about centos

Related posts about copy