Does the cp copy command, copy everything?

Status
Not open for further replies.

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Hi all,

I've just added a raidz2 pool and I'm copying content from one of the existing pools using the following commands:

cp -Rp /mnt/TV/TV/* /mnt/Goliath/TV

some of the smaller datasets I've copied (around the 30gig mark) show in the Freenas GUI's storage tab as the same size as the source, however when I copied a larger dataset, upon completion the source shows 606.4gig compared to the destination that shows 606.1gig.

It's only 300meg difference, but I'm curious as to what doesn't get moved over. Are there hidden files that aren't touched?

cheers
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Most likely hidden files or maybe compression playing a role. I would list all files and diff the output
 

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Most likely hidden files or maybe compression playing a role. I would list all files and diff the output

In the meantime i've seem the same thing occur on another dataset. 180.9 went down to 180.8, so nothing significant, but a difference non the less.

So you're thinking hidden files wouldn't be included in a cp -Rp transfer?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
In the meantime i've seem the same thing occur on another dataset. 180.9 went down to 180.8, so nothing significant, but a difference non the less.

So you're thinking hidden files wouldn't be included in a cp -Rp transfer?
I know for a fact that hidden files do not get copied. Try something like this to see difference between two directories.
Code:
[root@localhost ~]$ diff --brief -r dir1 dir2
Only in tmp1: .hidden
 

CraftyClown

Patron
Joined
Apr 5, 2014
Messages
214
Sorry SweetAndLow,

I'm being a complete newb I know, but that code is throwing me an error:

[root@freenas ~]# $ diff --brief -r mnt/TV/TV_shows mnt/Goliath/TV_Shows
bash: $: command not found

I presume I'm entering it incorrectly?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
^ this and make sure to provide an absolute path for your directories.

example:

diff --brief -r /mnt/TV/TV_shows /mnt/Goliath/TV_Shows
 
Status
Not open for further replies.
Top